
The Code:
clc;
clear;
% inialization
y0=10;
v0=15;
a=-9.81;
% time
t1=0:5;
t2=0:0.01:5;
% the equation
y1=y0+v0.*t1+0.5.*a.*t1.^2;
y2=y0+v0.*t2+0.5.*a.*t2.^2;
plot(t1,y1);
figure
plot(t2,y2);
--------------------------------------
The resultant figure for a step increase of 1s
The resultant figure for a step increase of 0.01s
No comments:
Post a Comment