How to compare elements of two vectors in MATLAB ?
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
charu shree
el 4 de Abr. de 2023
Comentada: charu shree
el 4 de Abr. de 2023
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 comentarios
Respuesta aceptada
Más respuestas (1)
James Tursa
el 4 de Abr. de 2023
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.
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!