LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to separate values from data in 1d array

i was thinking of greater 100 and less  300
0 Kudos
Message 11 of 19
(2,466 Views)

I forgot to ask what you wanted to do with that data...  😉

 

What do you mean by sorting using the range?  I thought you didn't want to sort..

 

The other post suggesting to use "In Range & Coerse" was close.  There is no need to use a loop as it is a polymorphic VI that handles arrays very well. 

See attached modified example.  The array "101 to 299" is an array of boolean indicating which values are between 100 & 300 not inclusively.

 

R

Message Edited by JoeLabView on 09-25-2008 10:18 PM
Message 12 of 19
(2,455 Views)

i do not want to sort the data in acending order or decending order.  for example the data reads in this order

                                                                   101,203, 301,203,302,111,305, 205,301,104,210 333

 

                                                     i would like to get this into 101  203 301

                                                                                               000  203 302

                                                                                               111  000 305

                                                                                               000  205 301 

                                                                                               104  210  333

 

                                                              its like reading three channels at the same time.  one would expect channe1 gaves 100s channel2 gaves 200 and channels 3 gaves 300s.

                                            sometimes when triggered only channel 2 and 3 fires, i would like to assigned zero to the none trigger channels

 

thanks alot in advance for help and suggestions

 

0 Kudos
Message 13 of 19
(2,444 Views)

Got it.

 

Will prepare example..

Message 14 of 19
(2,426 Views)
huh .. :S
Message Edited by engwei on 09-28-2008 10:21 PM
0 Kudos
Message 15 of 19
(2,423 Views)

Not my best code.  Rather messy actually.  But here it is.

 

If you really want 000 then you'd have to convert the numerics to strings and have arrays of strings which may be undesirable.

 

R

Message 16 of 19
(2,401 Views)

thanks alot. i'll have a look at it right away.

 

0 Kudos
Message 17 of 19
(2,378 Views)

wow I got the codes to work. thanks alot 

 

i got another questions about 2d-array and I would like to add them one after another.

 

    for example array 1   100 200 300

                                      101 201 301

                                      111 211 311

             and array 2

                                      101 222 301

                                      104 203 305

                                      154 263 325

               i would like to get them into

                                     

                                 100 200 300

                                 101 201 301

                                 111 211 311

                                 101 222 301

                                 104 203 305

                                 154 263 325

 

any suggestion.

 thanks in advance

 

0 Kudos
Message 18 of 19
(2,323 Views)
Use Build Array, but right click on it and set it to Concatenate mode.
0 Kudos
Message 19 of 19
(2,311 Views)