i have a for loop and a vector in this loop that chang each loop that spend how can save this vector in all times ?

1 回表示 (過去 30 日間)
like this code: h=1000 for i=1:h m=[i j] end that j change with every i how can save m vectors that produce in each time at loop?

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 10 月 18 日
編集済み: Azzi Abdelmalek 2013 年 10 月 18 日
h=1000
m=zeros(1000,2)
for i=1:h
m(i,:)=[i i+1]; %for example
end
disp(m)
  3 件のコメント

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by