Question: Storing procedure values somewhere

I have written a procedure.  Without going into details, here is the pseudocode of the procedure:

time:=proc(begin,end,c,deltaT)

t:=0;
v:=0;
accel:=5
where-we-at:=a;

while where-we-at =/= end do

distance:=*distanceformula*;
where-we-at:=*where-we-at* formula;
t:=t+deltaT;
v:=someformula;
accel:=accelformula;

end do;
return(t);
end proc:

 

I would like to graph some plots of, for example, t vs where-we-at, or t vs v, or whereweat vs v.. basically a few combinations of the parameters in the while loop at each "step" of the procedure. As a consequence i would like to find a way to store them somewhere at each "step". Store each distance,t,v,accel value related to it's where-we-at value for the whole while loop. How to do this? Thank you very much

Please Wait...