LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

matrix column ascending

Solved!
Go to solution

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

0 Kudos
Message 1 of 3
(2,127 Views)
Solution
Accepted by topic author Canalian

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.

 

Download All
Message 2 of 3
(2,118 Views)

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

0 Kudos
Message 3 of 3
(2,106 Views)