Just getting started with Matlab and am running into some issues. I need to store the ouput from each step of the For Loop in a matrix. The following is my code:
% Set initial paramters.
Cl_initial=3;R=0.5;u=0.5;Clt=0;% Solve for Cl residual.
for t=[68.92 109.97 287.22 116.95 171.89 90.3 103.54]; Clt=[t; Cl_initial*(1-R)/(1-R*exp(-u*t))];end
The way I have it set up now only saves the very last calculation in the matrix. Any help would be appreciated!
Best Answer