How can I add a column of zeros to a magic 5x5 matrix A to create a 5x6 matrix C?
5 ビュー (過去 30 日間)
古いコメントを表示
How can I add a column of zeros to a magic 5x5 matrix A to create a 5x6 matrix C? The element value in the 6th column should all be zero.
0 件のコメント
採用された回答
Image Analyst
2014 年 6 月 17 日
編集済み: Image Analyst
2014 年 6 月 17 日
Try this:
A = magic(5)
C = A; % Initialize a brand new matrix called C that is the same as A.
C(5,6) = 0 % Add column 6 that is all zeros.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!