09-10-2008 02:44 PM
Hello,
I was wondering how to separate values from 1 column to 2 columns
for example, 1d array gave 100,300,103,304,301,104,...
to 100,103,104
and to 300, 304, 301,..
09-10-2008 03:29 PM
You could start by feeding your array into the sort 1d array function. This will put the array elements into ascending order. From there use the search 1d array to get the index of the element you want to split the array at. Then use the split 1d array.
hope this helps.
09-10-2008 03:38 PM
09-11-2008 10:56 AM
I do not want to sort them in a acending/decending mode. I would like to sort them in real time.
I'm using labview 8.2 and I cant read the files.
Thanks
09-11-2008 12:42 PM
How was the file formatted?
It sounds like the file was a 2-d array, how did it end up 1-d?
In any event, have a loop iterate through every other value and put it in a 1-d array.
Then put the remaining values in a seperate 1-d array.
09-11-2008 12:45 PM - edited 09-11-2008 12:47 PM
I have not optimized the code (it's a bit slow). Is this what you are looking for?
See attachment in LV8.2
It does not sort the arrays but splits them in the order as they are found. The front part of the code is to generate 500 random numbers in two groups 100 to 109 & 300 to 309, to represent the numbers you have shown.
R
EDIT: Question: When you say "split in real time", are the numbers already into an array or it is prior to being in an array?
09-19-2008 07:02 PM
thanks for the code . it is working.
ps how does one incdlue > and < for sorting ?
09-24-2008 09:01 PM
Can you provide more details about what you mean on the Greater / Smaller than..
How do you want this comparison to be done?
R
09-24-2008 10:10 PM
09-25-2008 07:08 AM