How to define an array with multiple columns for each parameter in a for loop?
3 ビュー (過去 30 日間)
古いコメントを表示
I have a loop where each parameter should create an array with 20 columns so for n=1, there's 20 columns in the array, n=2, there's 20 columns in the array etc; so the final array should have 20*sz columns but am not sure how to code this (attempt below):
for n=1:sz
array(:,20]);
end
0 件のコメント
採用された回答
James Tursa
2017 年 1 月 9 日
At each iteration, the array sub-section indexing would be:
array(:,n*20-19:n*20)
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!