Operations with rows First, second and third
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
AIRTON
el 2 de Sept. de 2025
Respondida: Matt J
el 2 de Sept. de 2025
I have a matriz
a = [0 1 1 0 0 1 0 1 0; 1 1 0 1 0 0 1 1 1; 0 0 0 1 1 1 0 0 1]
I want to know how many times happen, in the same position, zero in the First row and 1 in the second row. After that, the first row and third row.
And then, I want to know the same with second row and first e third row.
Finally, third row and first row and second row.
I don’t know Very of MATLAB.
Thanks!!!
0 comentarios
Respuesta aceptada
Matt J
el 2 de Sept. de 2025
For example,
a = [0 1 1 0 0 1 0 1 0; 1 1 0 1 0 0 1 1 1; 0 0 0 1 1 1 0 0 1]
first_and_second = sum( ~a(1,:)&a(2,:))
0 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!