How can I get dynamic naming variables? So in a loop i need variables with names A1,A2,A3...... logic?
1 回表示 (過去 30 日間)
古いコメントを表示
回答 (1 件)
CS Researcher
2016 年 5 月 1 日
You can use eval. Try this:
for i = 1:10
eval(['A' num2str(i) ' = i;']);
end
2 件のコメント
参考
カテゴリ
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!