Y********x 发帖数: 322 | 1 I have a "for" loop, in each iteration, i want to save the
values of some variables, and in later iterations, i need to
retrieve these values for some comparison. How can I do it? I
am a novice of Matlab and you Bulls do not BS me... |
l*w 发帖数: 646 | 2 use array
if you need the variable to be A
then define A(n)
in the do loop,
for i=1:100:1
A(i)=...
end
then pick up and A(i) you need after the do loop.
【在 Y********x 的大作中提到】 : I have a "for" loop, in each iteration, i want to save the : values of some variables, and in later iterations, i need to : retrieve these values for some comparison. How can I do it? I : am a novice of Matlab and you Bulls do not BS me...
|
Y********x 发帖数: 322 | 3 actually the values to be saved are "arrays" too. Can I assign
the arrays to A(n)?
【在 l*w 的大作中提到】 : use array : if you need the variable to be A : then define A(n) : in the do loop, : for i=1:100:1 : A(i)=... : end : then pick up and A(i) you need after the do loop.
|
l*****i 发帖数: 3929 | 4 save them as rows or columns of a matrix, say A(:,i) or A(i,:)
【在 Y********x 的大作中提到】 : actually the values to be saved are "arrays" too. Can I assign : the arrays to A(n)?
|
f********r 发帖数: 50 | 5 or use cells
hehe
【在 Y********x 的大作中提到】 : actually the values to be saved are "arrays" too. Can I assign : the arrays to A(n)?
|
j**u 发帖数: 6059 | 6
您老终于出手了,呵呵。
【在 f********r 的大作中提到】 : or use cells : hehe
|