How to compare elements of two vectors in MATLAB ?
10 次查看(过去 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!