Question: Problem 1 (5+ (10 +3+2) = 20 points) Solving ODE initial value problem Consider the system of ODES = a(y-2), = -12 + bx -

 Problem 1 (5+ (10 +3+2) = 20 points) Solving ODE initial

Problem 1 (5+ (10 +3+2) = 20 points) Solving ODE initial value problem Consider the system of ODES = a(y-2), = -12 + bx - y, at = xy cz, where the parameters a = 10, b = 28, C = 8/3. We would like to solve this system for t (0,20] with initial condition: x(0) = 10, y(0) = 5, 2(0) = 20. Before attempting the following, you may find it helpful to review the CANVAS file TestCode_ode45.m that we demonstrated in the class. (a) Write a MATLAB function dynamics Yourlastname Yourfirstname_HW7p1.m to specify the dynamics (meaning the right hand sides of the above system of ODES. (b) Write another MATLAB script Yourlastname Yourfirstname HW7p1.m that calls your MAT- LAB function in part (a), and uses MATLAB solver ode45 to solve the above ODE initial value problem in the given time interval with the given initial condition. Your code should generate two figure windows: (i) 3D blue lineplot of x versus y versus z, superimposed with the initial condition plotted as a large red point. To make this 3D plot, look up the command plot3 in MATLAB documentation. Please use grid on and view(9,9.5) for this figure. (ii) 2D lineplots for the three time-series: t versus x, t versus y, and t versus z, all in the same figure window. Please use the legend() command for this figure to help understand which curve is which. Problem 1 (5+ (10 +3+2) = 20 points) Solving ODE initial value problem Consider the system of ODES = a(y-2), = -12 + bx - y, at = xy cz, where the parameters a = 10, b = 28, C = 8/3. We would like to solve this system for t (0,20] with initial condition: x(0) = 10, y(0) = 5, 2(0) = 20. Before attempting the following, you may find it helpful to review the CANVAS file TestCode_ode45.m that we demonstrated in the class. (a) Write a MATLAB function dynamics Yourlastname Yourfirstname_HW7p1.m to specify the dynamics (meaning the right hand sides of the above system of ODES. (b) Write another MATLAB script Yourlastname Yourfirstname HW7p1.m that calls your MAT- LAB function in part (a), and uses MATLAB solver ode45 to solve the above ODE initial value problem in the given time interval with the given initial condition. Your code should generate two figure windows: (i) 3D blue lineplot of x versus y versus z, superimposed with the initial condition plotted as a large red point. To make this 3D plot, look up the command plot3 in MATLAB documentation. Please use grid on and view(9,9.5) for this figure. (ii) 2D lineplots for the three time-series: t versus x, t versus y, and t versus z, all in the same figure window. Please use the legend() command for this figure to help understand which curve is which

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 Accounting Questions!