Vik*_*tor 5 sorting matlab
如何在matlab中按绝对值对矢量进行排序?
Jon*_*nas 9
使用SORT的第二个输出来获取顺序,然后对初始数组进行排序:
a = [-2 1 3 -1.1]; [~,idx] = sort(abs(a)); result = a(idx) result = 1 -1.1 -2 3
归档时间:
15 年,5 月 前
查看次数:
4964 次
最近记录: