How to find unique
    5 ビュー (過去 30 日間)
  
       古いコメントを表示
    
I have two columns of numbers, X and Y, and i need to find each unique combination of numbers, so far i have this code
s=0
for i=1:n;
if length(unique(x(i)))==x(i);
   s=s+length(unique(y(i)));
else if length(unique(y(i)))==y(i);
       s=s+length(unique(x(i)));
   end
end
end
I'm getting closer to my answer, so hopefully it just needs a few small tweaks, but i can't figure out what?
0 件のコメント
回答 (1 件)
参考
カテゴリ
				Help Center および File Exchange で Logical についてさらに検索
			
	製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!