Question: 5. Modify - Second Order ODE.m to do the following: a) Use the ode45() function to plot the solution for: X+4x+6*+8x = f(t) where f(t)

5. Modify - Second Order ODE.m to do the following: a) Use the ode45() function to plot the solution for: X+4x+6*+8x = f(t) where f(t) = u(t) (a unit step) over the range 0 to 10 seconds. All initial conditions are zero. Plot the position and velocity on separate graphs Paste your Matlab script and your plot for problem-4 here! t, X) dep. var El function XDOT deriv El ind, var %define model parameters m=1; c=4; k=16; % define the states as "nice" names x=X (1); xdot=X (2); %define any forcing functions f=5*sin (2*t); %write the non-trivial equations using the nice names xddot= (1/m) * ( f -c*xdot k*x ); XDOT = [xdot;xddot] ; %return the derivative value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
