How to compare values in one vector?
3 次查看(过去 30 天)
显示 更早的评论
for example B=[1,2,2,5,4,4]
so i only want output 1,5,i dont want 2,4 because they have same value in this vector.
how to do this within fop-loop?
回答(1 个)
KSSV
2020-4-9
a=[1,2,2,5,4,4];
xbins = unique(a);
[counts,centres] = hist(a,xbins);
iwant = a(counts==1)
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!