代码
s=[2;2;1;1;3;3;]
[a,b] = unique(s);
c = sortrows([b,a]);
new_s=c(:,2:size(c,2))
输出
参考:https://www.itread01.com/content/1550527216.html
代码
s=[2;2;1;1;3;3;]
[a,b] = unique(s);
c = sortrows([b,a]);
new_s=c(:,2:size(c,2))
输出
参考:https://www.itread01.com/content/1550527216.html