09-10-2009 07:34 AM
i've got an string array that is currently like this:
| place name 1 | 25.3 | 34.9 | 0 | 3456 |
.....yadda, yadda
|place name x | 34.3 | 34.6 | 13 | 2332 |
i want to cut this 2d string array into:
| place name 1 | place name 2| .....................| place name x| as a string array
and
| 25.3 | 34.9 | 0 | 3456 |
........yadda, yadda
| 34.3 | 34.6 | 13 | 2332 | in a dbl 2d array
09-10-2009 07:34 AM
09-10-2009 07:35 AM
09-10-2009 07:38 AM - edited 09-10-2009 07:41 AM
Yup that gets me a dbl array of the data (jsut need to crop off the first column as its full of 0's - not a problem at all)
Any ideas about the text string extraction of column 0?
(attatchment shows current vi back pannel)
09-10-2009 07:49 AM - edited 09-10-2009 07:50 AM
09-10-2009 08:15 AM - edited 09-10-2009 08:18 AM
cool, that works, although i've just spotted a complication, the data that i'm comapring it to is in alphabetical order, this isn't is there a way to alphabetize the original 2d string acording to the 0'th column for each row?
- i know it keeps getting more complicated!
Basically i need a sort 1D array, but on that will do one of alphabeical order a-z
-ha! the sort 1d array actually accepts a string - may well have sorted the problem!
09-10-2009 08:19 AM
09-10-2009 08:30 AM - edited 09-10-2009 08:32 AM
yeah it sorts the places, but i also need the data that follows the names on each line (the whole column) to be rearanged with it.
So basically order each row in acordance with the the column 0 alphabetical order.
i could go back to original problem of leaving it as a 1d array of the places and data in the format: 'name,000,000,000,000 and then reaarange and the data will reagrange with it (as part of its name), but then i'm back to the original problem of how to convert the incorrectly aranged data back into a 2d array.
09-10-2009 08:40 AM
this may help:
09-10-2009 08:40 AM
well i've found a non-labview way to do it, just go into excel, data - sort - sort by column A, a-z assending
its not a labview solution but it'll work for what i need to do for now.
John P.