Question: I. (a) Modify the function ex-with-2eqs to solve the IVP (L4.4) for 0 t 50 using the MATLAB routine ode45. Call the new function LAB04ex1.

 I. (a) Modify the function ex-with-2eqs to solve the IVP (L4.4)for 0 t 50 using the MATLAB routine ode45. Call the new

I. (a) Modify the function ex-with-2eqs to solve the IVP (L4.4) for 0 t 50 using the MATLAB routine ode45. Call the new function LAB04ex1. Let [t, Y] (note the upper case Y) be the output of ode45 and y and v the unknown functions. Use the following commands to define the ODE: function dYdt- f (t,Y) y=Y (1): v=Y(2) ; ardt = [V, sin(t)-7sv-5*y]; Plot y(t) and v(t) in the same window (do not use subplot), and the phase plot showingv vs y in a separate window. Add a legend to the first plot. (Note: to display v(t) y'(t), use 'v(t)-y'(t)') Add a grid. Use the command ylim([-1.2,1.2]) to adjust the y-limits for both plots. Adjust the x-limits in the phase plot so as to reproduce the pictures in Figure L4g. Include the M-file in your report

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!