2017-09-24 33 views

回答

0

可以单独排序MyClass.r并使用以前的指数阵列重新排列对象的数组:

[~,ind]= sort([arr.r]) % arr is the array of objects 
         % ind is the array of previous indices 
arr= arr(ind) 
相关问题