Row major order matrix
11 ビュー (過去 30 日間)
古いコメントを表示
Im trying to create a 11x11 matrix in column matrix order using numbers 1-121 but i cannot figure out how to do it. I'm trying to use the ones and zeros command and transpose and similar functions.
0 件のコメント
回答 (1 件)
Andrei Bobrov
2015 年 10 月 15 日
編集済み: Andrei Bobrov
2015 年 10 月 16 日
out = bsxfun(@plus,1:11:111,(0:10)')
or
out = reshape(1:121,11,[]);
or
out = zeros(11);
out(:) = 1:121;
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!