LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert array to numeric?

Exp: I have an array , generated by 2,3,5,3,49,0.... , I want to take  value of new element  each time array update new element. How to convert it?
0 Kudos
Message 1 of 11
(6,919 Views)
Do you mean you want to get the most recent element added to an array or you want know which elements are new in the array (which means there can be more than one and not necessarily at the end of the array) ?

Trying to help

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 11
(6,890 Views)
hi, I want to get the newest element added to an array !
0 Kudos
Message 3 of 11
(6,873 Views)
That depends on your method for building the array. Are you inserting all your values at the end of the array? In that case, the following code will let you access the last element of the array.
 
 
 
If you are randomly inserting values all over the array, you will need to maintain a shift register that contains the index of the most recently inserted value. I dont really understand your original question entirely. Does this answer it?


Message Edited by jrpe on 11-15-2007 09:03 AM
Jeff


Using Labview 7 Express
0 Kudos
Message 4 of 11
(6,867 Views)
no, I want to take the newest elementS, not only the last.
0 Kudos
Message 5 of 11
(6,860 Views)
You are going to have to give more information about your program. What are the newest elements? How do you determine how many of the elements in the array are "new"? How are they inserted? randomly? or always at the end? When do you insert them into the array?  When you say "newest" values, is it possible that you mean that there is an array, and from one iteration of a loop to the next you want to find which values changed? and those changed values are what you are referring to as "new values"?
 
Please give a lot more details.
Jeff


Using Labview 7 Express
0 Kudos
Message 6 of 11
(6,856 Views)
My array is dynamic ( I put radom numeric in for loop) !i want to take all the elements in array.
0 Kudos
Message 7 of 11
(6,852 Views)
That just makes things more confusing.

I'm sorry, but you're not explaining things well enough for us to understand what you want. The best thing to do is to post the code you have, and then indicate on the block diagram, or in the post what you want.
0 Kudos
Message 8 of 11
(6,846 Views)
wow thats confusing, I agree with smercurio, please post your code or a .PNG of your code (Im only using 7.0 so I probably wont be able to open a .vi you post). Describe what your overall goal for the program is, because right now is you are doing something like building an array of random values in a for loop...and want to take all the new values out...which would seem to me to just be the random values. So please post your code and a description of what you would like the end result to be.
Jeff


Using Labview 7 Express
0 Kudos
Message 9 of 11
(6,837 Views)
I want to plot a bar graph with radom array ( like the diagram i given). And I want to put color in bar, if the length of bar >4 =>  bar is red,  =<3 is blue, 3< length<4 is green. I can plot it with radom number. But which array, i can't. That's why i want to convert array to number. I hope you understand. Thanks.
0 Kudos
Message 10 of 11
(6,827 Views)