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!