From: Aui on
Hi Steve, thanks!

Finally, got it.

>> A = [1 200 300;
2 200 200;
3 100 100;];
>> [d1,d2] = sort(A(:,2));
>> B=A(d2,:);
>> sortrows(B,3)

ans =

3 100 100
2 200 200
1 200 300
From: Jan Simon on
Dear Aui!

> Finally, got it.
> >> A = [1 200 300;
> 2 200 200;
> 3 100 100;];
> >> [d1,d2] = sort(A(:,2));
> >> B=A(d2,:);
> >> sortrows(B,3)
>
> ans =
> 3 100 100
> 2 200 200
> 1 200 300

What about:
sortrows(A, [2, 3])

Kind regards, Jan
From: Aui on
Hi Jan,

Thanks. That's a lot more better.
Didn't know we can do that~~!