how can i add 2 row
조회 수: 6 (최근 30일)
이전 댓글 표시
A=[-1,-1,0,0,0;0,0,0,-1,0;0,1,-1,0,-1;0,0,1,0,0;1,0,0,1,1]
With that matrix how can i add row to row command (code)
And in any kind of matrix?
댓글 수: 0
채택된 답변
Walter Roberson
2013년 6월 6일
A(FirstRow,:) + A(SecondRow,:)
Or if you want to get fancier,
sum(A([FirstRow, SecondRow],:))
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!