From: John Rossy on 21 May 2010 16:42 Hello! Can somebody tell me where is the problme in the following code (timestep cant be increased). Thanx in advance! clear %function falling_apple g= 9.81; h(1,1)=10; v(1,1)=10; timestep=0.01; index=1; while (h(index)>0) v(index+1,1)=v(index,1)-g*timestep; h(index+1,1)=h(index,1)-v(index,1)*timestep; index=index+1; end figure(1); plot(v); xlabel('timestep'); ylabel ('v[m/s]'); figure(2); plot(h); xlabel('timesptep'); xlabel('h[m]'); return
From: Matt Fig on 21 May 2010 21:40 You must be in the same class as Paso Sivro. Maybe you two can get together and figure it out....
|
Pages: 1 Prev: Problem with code Next: ERROR MESSAGE:The desktop configuration was not saved successfully |