How to remove duplicates from a matrix without using unique?
显示 更早的评论
d = [1 6 -1 5 6 7 0 5 6 0 8 0]
a = [-1 0 1 5 6 7 8]
How can I convert the vector d to vector a?
Please dont use unique
回答(2 个)
Walter Roberson
2020-11-23
[~, a]=findgroups(d);
John D'Errico
2020-11-23
1 个投票
How could you use the output of a sort to help? Why not make an effort?
类别
在 帮助中心 和 File Exchange 中查找有关 Data Types 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!