gsort function

Carrico, Paul paul.carrico at esterline.com
Wed Nov 17 14:40:33 CET 2010


Dear all,

 

Sort algorithms are rather new for me ...

 

In the example herebellow and after some tests, I've noticed that the
matrix is sorted from the 1rst column :

- is it possible to choose the column to sort ?

- otherwise does it mean it's necessary to permute the desired column
with the first one to sort ?

 

Thanks in advance

 

Cheers

 

Paul

 
########
 
mode(0); 
clearglobal();
 

D = [ 
    1 0 3 11 10 13;
     4 9 6 -1 -1 0; 
    17 8 39 9 -451 3; 
    10 110 -12 1 -9 45 ; 
    -13 514 15 78 -99 3]
 

D_lr = gsort(D,'lr','i')

--------------------------------------------------------------------------------


Le présent mail et ses pièces jointes sont confidentiels et destinés à la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de votre système. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite.

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20101117/a1a48a61/attachment.htm>


More information about the users mailing list