samedi 25 avril 2015

MatLab Sortrows if statement is true

I want to sort a table by a simple condition. If 3 of 5 vectors in a group are >0 than put that row on top of the table.

I tried it with sortrow but i cant implement this condition.

The concrete case i want to solve is a table which consists of 11 columns. First column shows names assocciated to the values in the rows respectively. Rest of the columns is splitted into 2 groups for example A1:A5 and B1:B5. If in group A 3 of 5 cells are >0 than put this row on top of the table. First row should logically be the row were every value is >0.

I tried many things including combination of sortrows and if statements but it didnt work.

Maybe you have an idea. Thank you very much.

Aucun commentaire:

Enregistrer un commentaire