Hi,
I am trying to undo a sort in this way:
>> a = [1,2,5,4,3];>> [b,I] = sort(a);>> isequal(b(I),a)ans = 1
But when I try with a larger data set it doesn't work.
>> [ue_seq_sorted, I] = sort(ue_seq);>> isequal(ue_seq_sorted(I),ue_seq)ans = 0>> whos Name Size Bytes Class Attributes I 1x98635 789080 double ue_seq 1x98635 789080 double ue_seq_sorted 1x98635 789080 double
The data has much larger integers – for example:
Columns 98633 through 98635 135673517 135674897 135676277
Is there another way to sort/undo the sort here?
Thank you!
Kind regards, Martin
Best Answer