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 ?

2 次查看(过去 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 CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by