Unique numbers in array
显示 更早的评论
I was charged to try and write my own unique function , I was thinking of first sorting the array, and then writing a loop that went through each number from min(min) to max(max) but cant figure out once a repeated number is identified to skip it. Any thoughts?
采纳的回答
更多回答(1 个)
Azzi Abdelmalek
2014-4-23
编辑:Azzi Abdelmalek
2014-4-23
out= unique(A)
Or
out=unique(A,'rows')
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!