How can i find "AND" or "OR" of rows in a matrix?
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
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).
0 件のコメント
回答 (1 件)
Matt Fig
2011 年 5 月 14 日
A = round(rand(3,10))
all(A) % A(1,:) & A(2,:) & A(3,:)
any(A) % A(1,:) | A(2,:) | A(3,:)
0 件のコメント
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!