Fastest & most effective way to create this matrix:
古いコメントを表示
Hey there, I have been searching for hours for a good solution & not found one yet. I need to create this matrix (6X6):
A = 0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 1 2 3
0 0 0 4 5 6
0 0 0 7 8 9
It must be in an effective & short way. Thank you if anyone can help with this one.
採用された回答
その他の回答 (1 件)
clear A;
A(4:6,4:6) = reshape(1:9,3,3)'
2 件のコメント
Eitan
2014 年 12 月 19 日
Sean de Wolski
2014 年 12 月 19 日
I'd expect this to be the fastest way to do this.
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!