How to process a subset of a matrix
1 回表示 (過去 30 日間)
古いコメントを表示
I have a nxm matrix and I want to divide the first R rows by a certain number. For example,
2 4 6 8
10 12 14 16
1 3 5 7
6 7 13 9
I want to divide the first two rows by 2 to get the modified matrix as
1 2 3 4
5 6 7 8
1 3 5 7
6 7 13 9
I know its simple but how to do it?
0 件のコメント
採用された回答
David Fletcher
2018 年 4 月 13 日
編集済み: David Fletcher
2018 年 4 月 13 日
matrixName(2,:)=matrixName(2,:)/2
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!