Operations with rows First, second and third
조회 수: 3 (최근 30일)
이전 댓글 표시
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
채택된 답변
Matt J
2025년 9월 2일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!