例如,我想转换
x = [45 25 65 70 60 70 45 70 15 70 25] 至
y = [70 45 25 65 60 45 15 25]这里最可能的元素是70,所以在新数组y中,我希望将70放在第一个位置,然后将其他元素放在新数组中。
有人能提出解决办法吗??
发布于 2016-04-06 05:00:59
这将起作用:
y = [mode(x) x(x ~= mode(x))]; %//remove most frequent element and add it to the fronthttps://stackoverflow.com/questions/36441725
复制相似问题