Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Recall that the velocity and positions can be calculated using the following rel

ID: 3775792 • Letter: R

Question

Recall that the velocity and positions can be calculated using the following relationships: v(t) = at + v_o x(t) = 1/2 at^2 + v_o t + x_o For an object in free-fall, acceleration is -9.80665 m/s^2. Your function takes .six input arguments Acceleration a Initial time to Final time tf Number of points n Initial position xo Initial velocity v0 The function file returns no output variables but generates plots of position and velocity for the range of time specified by the user of the command window. Use the subplot command to show x(t) as a lop plot and v(t) as the bottom plot. Run a case with the following input parameters: Acceleration -9.80665 m/s^2 Initial time 0 s Final time 2 s Number of points 20 points Initial position 1.3 m Initial velocity 0.1 m/s On your printout of the function file, write (with pen, etc.) how you called your function in the command window. Your command must be a single command line Submission: 1 function m-file, plot.

Explanation / Answer

syms t
x=0.4*t.^4+10.8*t.^3-64.4*t.^2-28.2*t+4.4
x=(0.4*t.^4)+(10.8*t.^3)-(64.4*t.^2)-(28.2*t)+4.4
v=diff(x)
a=diff(v)
t=0:0.1:8-0.1;
X=subs(x,t);
V=subs(v,t);
A=subs(a,t);
figure, plot(t,X,t,V,'r',t,A,'g')
legend(' Position','Velocity','Acceleration')

this poitstion,accelectraion,velocity plot.