How can i find "AND" or "OR" of rows in a matrix?
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
Hi friends,
I'm actually working on a matrix and i need to apply "and" logic operation on the rows. For example, if we have Matrix A with 3 rows and 10 columns, i want to find the Matrix B with size 1*10 which has the result of the operation (Row1) & (Row2) & (Row3).
Respuestas (1)
Matt Fig
el 14 de Mayo de 2011
A = round(rand(3,10))
all(A) % A(1,:) & A(2,:) & A(3,:)
any(A) % A(1,:) | A(2,:) | A(3,:)
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!