How to compare elements of two vectors in MATLAB ?
조회 수: 12 (최근 30일)
이전 댓글 표시
Hello all, I want to compare elements of two vectors of dimension 2 x 8 but without using for loop.
Any help in this regard will be highly appreciated.
댓글 수: 0
추가 답변 (1개)
James Tursa
2023년 4월 4일
Compare for what purpose? E.g., these statements will compare them:
isequal(v1,v2) % are they equal
v1 == v2 % matrix of individual element comparisons
... and others
Unless you tell us what you intend to do with the comparison it is hard to advise you which method would apply.
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!