Check if matrix has two identical rows
33 次查看(过去 30 天)
显示 更早的评论
Hi everyone, I wanted to check if a matrix has two identical rows. But i cant create a code that can do that. I was wondering if anyone has any idea on how to do that?
0 个评论
采纳的回答
Dr. Seis
2012-1-4
If you want to remove identical rows, then
B = unique(A,'rows');
As a check, if size(B) ~= size(A), then you have at least two identical rows.
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!