Storing for loop calculations
3 ビュー (過去 30 日間)
古いコメントを表示
I am interested in storing all the results of a for loop in separate matrices. How do I write a function such that Matlab will store the matrix result of, say, the ith iteration as [Ai]?
0 件のコメント
回答 (1 件)
Image Analyst
2014 年 5 月 14 日
for k = 1 : whatever
A(k) = blahblahFooBar;
end
It's recommended to use variables other than i and j (imaginary variables) as loop indexes.
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!