[Maxima] sort array columns

Mikhail Maroukhine mikolg at sibmail.com
Mon Dec 3 11:56:29 CST 2007


Hello All,

Please suggest how I may sort columns of a matrix by some column values.
For example I have:

<- p: matrix([3,2,5],[7,8,9]);
<- P: sort(p, ???);

I want to have
<- grind(p);
-> matrix([2,3,5],[8,7,9])$

or using list

<- p: [[3,2,5],[7,8,9]];
<- P: sort(p, ???);

I want to have
<- grind(p);
-> [[2,3,5],[8,7,9]]$


Thank you,

Mikhail


More information about the Maxima mailing list