Save for loop result

1 次查看(过去 30 天)
Ferd
Ferd 2012-4-13
Hi
My Code is like this,
for i = 1:100
for j = 1:500
B
end
Result_B
end
The Result_B is a single column vector for 500j's and a single i(latest value).
What I would like is to have that Result_B to be as it is, that is a column matrix, just that with every new incremented i the result to be tacked onto the next column.
Thanks

采纳的回答

Thomas
Thomas 2012-4-13
This video should help:
Eg>
for i = 1:100
for j = 1:500
B(i,j)=rand(1);
end
end
B will be a matrix of 100*500
  1 个评论
Ferd
Ferd 2012-4-13
Hey Kewl... Thanks! This is what I wanted.

请先登录,再进行评论。

更多回答(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