已知 y=500-(t-10)^2题目1:using a WHILE loop and a time step for t of 0.01, to find the time t at which y is maximum题目2:using a WHILE loop and a time step for t of 0.01, determine the elapsed time required for y initially go from 200 to 0
你们的命令都能执行 但是max和abs等命令 还木有学…………
1max=0;t=5;while t<15y=500-(t-10)^2;if y>maxmax=y;endt=t+0.01;endmax2t=10;y=500;while y>=0y=500-(t-10)^2;if abs(y-200)<0.1t0=t;endt=t+0.01;endt=t-t0 |
|