Icrontic Forums
>
Software
>
General Software
>
Matlab Help
> Creating array with while loop results
PDA
View Full Version :
Creating array with while loop results
ldelgad8
28 Sep 2007, 03:49am
How do you store the results of a while loop as an array, so I can do a min, max, and median.
thank you,
ld
shwaip
28 Sep 2007, 05:41am
you'll want to use a variable to keep track of the index:
ind=1;
while (whatever)
%code
answers(ind) = whatever you want;
ind = ind + 1;
end
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.