How can search for identical rows in a matrix?
3 次查看(过去 30 天)
显示 更早的评论
Hi, I need seach identical rows in a matrix. Can anybody help me?
Thanks
0 个评论
回答(1 个)
Mark Schwab
2018-1-25
A brief answer would be to use the "isequal" function and row indexing. For example:
% A = some matrix
if (isequal(A(i,:),A(j,:)))
% Then row i of matrix A is equal to row j
end
Please refer to the following documentation for more information on the isequal funciton:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!