common part of two vectors
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Darek Myszk
el 7 de Nov. de 2018
Comentada: Star Strider
el 7 de Nov. de 2018
Hi. I Have a problem. I must to compare two vector: i.e A = [0 1 1 1 1] and B = [0 1 0 0 1]
to find two ones, in the same places in both vectors ->

I wrote something like this: [ii,jj]=find(A==B); but this also counts zero.
Thanks for help.
0 comentarios
Respuesta aceptada
Star Strider
el 7 de Nov. de 2018
Try this:
A = [0 1 1 1 1];
B = [0 1 0 0 1];
Result = A & B
Result =
1×5 logical array
0 1 0 0 1
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Operators and Elementary Operations 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!