How to assign values to 100 by 2 matrix?
古いコメントを表示
I have a matrix (2,3); how could I initialize a 100 by 2 matrix with the first column all=2 and second column all=3.
Thank you!
採用された回答
その他の回答 (2 件)
A=[2 3]
A1=[A(1)*ones(100,1) A(2)*ones(100,1)]
Murugan C
2019 年 5 月 15 日
x=ones(100,2);
x(1:end,1) =2;
x(1:end,2) =3;
Try the above code.
Thanks in advance!!!
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!