How to print numbers 1 to 4 and add all numbers to a one array?
10 ビュー (過去 30 日間)
表示 古いコメント
results
1
2
3
4
a= [1 2 3 4];
採用された回答
Awais Saeed
2021 年 8 月 23 日
Perhaps this is what you want
for col =1:1:4
disp(col)
a(col) = col;
end
disp(['a = ',num2str(a)])
その他の回答 (1 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!