cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

sort matrix

payman
13-Aquamarine

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.

1 ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:payman)

You should be using the csort(M,c) function, where you can sort matrix M on the values of column c.

Success!
Luc

View solution in original post

2 REPLIES 2
LucMeekes
23-Emerald III
(To:payman)

You should be using the csort(M,c) function, where you can sort matrix M on the values of column c.

Success!
Luc

payman
13-Aquamarine
(To:LucMeekes)

Thank you.

Top Tags