04-19-2011 07:30 PM
Hi,
I have the data from a matrix (all real numbers) and i need to put the columns in ascending order (so that the largest value column if you added all the rows up is the first, second is second ect) so i can select the largest columns but i cant work out how to do this.
Any help you can give is greatly appreciated.
Thanks
Nick
Solved! Go to Solution.
04-19-2011 09:33 PM - edited 04-19-2011 09:35 PM
I think you are looking for descending order (not ascending), else the smallest culumn would be first. Also, if you only need the largest column, there is no need to rebuild the entire 2D array.
Here's a quick draft (LabVIEW 8.2). The lower part just gets the largest column and its sum while the upper part rebuilds the entire 2D array sorted by the sum of elements in each column. Pick what you need and delete the unneeded code.
04-20-2011 12:34 AM
Thanks so much for the help and attaching the files you have just fixed a problem ive been working on for two days.
Thanks again
Nick