02-24-2010 07:00 PM
02-24-2010 07:02 PM
02-24-2010 07:39 PM - edited 02-24-2010 07:40 PM
02-24-2010 07:48 PM
02-24-2010 08:38 PM
Michelle,
I do not understand the difficulty of the question. It seems you ask to:
1/ pre allocate array fo 5 elements.
2/ start while loop
3/ In while loop, rotate array
4/ fill first element with new random number
5/ if number equals 9, stop while loop
6/ if while loop ends, output pre-allocated array.
Not sure where the difficulty or issue is?
Is the problem with rotating an array in labview?
Is the problem with pre-allocating an array?
It all seems a 5 minute exercise. So not sure what I'm missing in the problem statement.
02-24-2010 10:51 PM - edited 02-24-2010 10:59 PM
If it is so easy... why I don't find many solutions proposed for my question? I don't understand why YOU dont understand me. I have showed also an example. I DON'T WANT ROTATE ARRAY.
1) The WHILE LOOP generates a random numbers;
2) An array of 5 elements is initialized with 0. I don't understand why you think that array must be rotate. I write array in this why 0 0 0 0 0 because it's easier than write array in vertical:
0
0
0
0
0
but if for you is life question I write so.
3) While loop generates number 2 (for example);
4) this number is put like the first element of array:
2
0
0
0
0
5) While loop generates number 7 (for example)
6) this number is put like the first element of array:
7
2
0
0
0
7) Repeat (5) and (6) for many times... supposed that 9 is never generated.
😎 After 13(for example) iterations the array of 5 elements is:
2
5
1
8
5
9) While loop generates number 9;
10) Array of 5 elements becames:
9
2
5
1
8
11) the number 9 is the condition of end loop, but also the condition to save array of 5 elements in a excel file, for example, named save.xls;
12) in the excel file there is:
9
2
5
1
8
It's ok now???
It's very very simple... so all you say... but... the solution doesn't arrive 😉
The method of Diane is not intelligent. To do this it's goos to find a simple method. If to put one element you do 200 operations I think that is not very good.
THE REAL PROBLEM OF THIS EXERCISE IS NOT FIND A STUPID WAY TO DO IT,
BUT FIND A INTELLIGENT WAY TO DO THIS WITH A LITTLE (GOOD IF MINIMUM) NUMBER OF OPERATIONS (Ok Diane? ;)).
02-24-2010 11:18 PM
Michelle are you mad? Don't you stop yelling at those who tried to help you? If you continue like this i will ask the moderator to remove you from this nice forum.
02-24-2010 11:28 PM
Okay, I am really getting ticked off at your attitude.
Do you have any experience in programming in any language? Have you even looked at any of the LabVIEW tutorials whose links have been given to you?
How the hell are you supposed to get any respect from people if you are saying things like this:
Michelle1892773 wrote:
The method of Diane is not intelligent. To do this it's goos to find a simple method. If to put one element you do 200 operations I think that is not very good.
THE REAL PROBLEM OF THIS EXERCISE IS NOT FIND A STUPID WAY TO DO IT,
BUT FIND A INTELLIGENT WAY TO DO THIS WITH A LITTLE (GOOD IF MINIMUM) NUMBER OF OPERATIONS (Ok Diane? ;)).
Diane if you have the good and BEST solution post your VI so all us can see if you are very intelligent. I see many persons who have a INTELLIGENT, BUT VERY SECRET (;)) SOLUTION... if you are genius show this to everyone... Many people tell that the solution is ready in 5 minutes... but I see that they prefer write a lot like if this forum is a chat than propose intelligent solution to everyone.
So Diane is stupid, along with several other people who have responded. You know her method is not intelligent. How? Where is your intelligence coming from? If you know the difference between a stupid method and an intelligent method, then you ought to be able to solve your problem yourself! Yet, you can't even adequately describe the problem your having. If numerous people on here have stated they don't understand what you are trying to do, even after you've tried to describe it several times, I guess that means we are ALL STUPID except for you.
You don't even understand some basic terminology. Look up Rotate Array in the LabVIEW help. It means you take the element from one end of the array and place it at the other end shifting all the other elements over. The horizontal vs. vertical writing of your array as you've shown it is NOT rotate array. It is actually transpose. Which means you are swapping rows for columns and vice versa. Though technically that has no meaning for a one dimensional array because it has only one column (although you can show it in LabVIEW as either a single horizontal row, or single veritcal column.)
Unless the attitude you show in your posts changes immediately, and you start showing that you are putting some effort into your own problem rather than criticizing the help that people are trying to give you, I guarantee nobody will bother responding to your questions again.
02-24-2010 11:42 PM
02-25-2010 12:09 AM