[scilab-Users] sort problem
Adrien Vogt-Schilb
vogt at centre-cired.fr
Wed Mar 9 09:05:35 CET 2011
Le 09/03/2011 06:33, computidoo a écrit :
> I have a matrix and i want the row to be order as culom 2 in the matrix
>
> example
>
> a=[1 2 3 ;
> 2 3 1;
> 3 1 2]
[foo k] = gsort(a(:,2),'r','i')
b=a(k,:)
more info:
help gsort
help extraction
br
avs
> so the answer will be
>
> [3 1 2;
> 1 2 3;
> 2 3 1]
>
> best regards
> computidoo
>
> --
> View this message in context: http://mailinglists.scilab.org/sort-problem-tp2654045p2654045.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110309/df3fca9c/attachment.htm>
More information about the users
mailing list