sort matrix
Oct 22, 2014
02:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Oct 22, 2014
02:56 PM
sort matrix
Hello,
For a given matrix, I want to sort the first column in descending order WITH the corresponded component on the second column. I can't use the "sort" function since it changes the order of one column's elements only.
Could you please help me with this issue?
Thank you.
Solved! Go to Solution.
ACCEPTED SOLUTION
Accepted Solutions
Oct 22, 2014
03:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Oct 22, 2014
03:52 PM
You should be using the csort(M,c) function, where you can sort matrix M on the values of column c.
Success!
Luc
2 REPLIES 2
Oct 22, 2014
03:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Oct 22, 2014
03:52 PM
You should be using the csort(M,c) function, where you can sort matrix M on the values of column c.
Success!
Luc
Oct 22, 2014
04:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Oct 22, 2014
04:10 PM
Thank you.
