How can search for identical rows in a matrix?

조회 수: 3 (최근 30일)
Miguel Angel Guardiola Marco
Miguel Angel Guardiola Marco 2018년 1월 22일
답변: Mark Schwab 2018년 1월 25일
Hi, I need seach identical rows in a matrix. Can anybody help me?
Thanks

답변 (1개)

Mark Schwab
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:

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by