Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How can I do this ?

I have a Mat. I want to change the order of its rows, based on the value of their first element. So a row that begins with 1 will be placed before a row beginning with 2 etc. If two rows begin with the same number, I want to keep their original order.

Is there a simple way to achieve this ? I would be very grateful if someone help me.

click to hide/show revision 2
No.2 Revision

How can I do this ?sort the matrix acc. to the first column?

I have a Mat. I want to change the order of its rows, based on the value of their first element. So a row that begins with 1 will be placed before a row beginning with 2 etc. If two rows begin with the same number, I want to keep their original order.

Is there a simple way to achieve this ? I would be very grateful if someone help me.