- How many rows are identical to row 1?
- For each row, how many rows are identical to it?
- For each row, which rows are identical to it?
- etc.
How to identifiy similar rows in a matrix ?
1 次查看(过去 30 天)
显示 更早的评论
hi everbody, I try to identify similar rows in a matrix. I have tried this but it works only wenn the similar rows are next one to another.
t= [1 2;2 3;4 5;5 4;8 7;6 9]
for i= 1:length(t)-1
if t(i,:)==t(i+1,:)
disp('one Match');
else
disp('no match');
end
end
I think the command ismember can do that but I don´t realy know how to implement it.
1 个评论
Jos (10584)
2015-6-23
What do you want to know exactly?
I am pretty sure you can use UNIQUE and/or ISMEMBER and/or HISTC.
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!