my code is
t1 = 0;t2 = 10;t3 = 20;t4 = 30;t = 0:50;if (t>=t1)&&(t<t2) r = 0.6; if (t>=t2)&&(t<t3) r = 0.3; if (t>=t3)&&(t<t4) r = 0.3; if (t>=t4) r = 0.6; end end endendplot(t,r)
displacement
t1 = 0;t2 = 10;t3 = 20;t4 = 30;t = 0:50;if (t>=t1)&&(t<t2) r = 0.6; if (t>=t2)&&(t<t3) r = 0.3; if (t>=t3)&&(t<t4) r = 0.3; if (t>=t4) r = 0.6; end end endendplot(t,r)
Best Answer