Question: Task 5: Lorenz Butterfly (10 Pts) a) Write a MATLAB function Lorenz_butterfly.m that returns a system of differential equations known as the Lorenz butterfly, which

 Task 5: Lorenz Butterfly (10 Pts) a) Write a MATLAB functionLorenz_butterfly.m that returns a system of differential equations known as the Lorenz

Task 5: Lorenz Butterfly (10 Pts) a) Write a MATLAB function Lorenz_butterfly.m that returns a system of differential equations known as the Lorenz butterfly, which is described by the following three differential equations dYldt--XZ+rX-Y which we shall study for parameters of: ?-10, b-8/3 , r-160. This is a chaotic system of ODEs (the original system studied) where solutions orbit around steady state points. This function, like all functions to be sent to ode_Kutta, has an interface of Valid call: dydx- Lorenz_butterfly(, y) Inputs: This is a homogeneous system of equations. It does not depend on x, hence the tilde. The dependent variable, which is a column vector. : : Output: dydx: The ODE, i.e., dy/dx - f(-, y) Validation: Your code should throw an error if any of the following are true: y is not a column vector of length 3 In your implementation, set y(1,-X, y(2) = Y; y(3)-Z where x will be time t. e v is not numeric b) Write a MATLAB function Predator_Prey.m that returns the rate of change of prey and predator populations as given by the differential equations given below, d X dt dt Here, X and Y are the number of prey and predators, a is the prey growth rate, c is the predator death rate, b and d indicate the effect of the interaction between the of the prey and the predators on their respective population. Note that the predator number do not necessarily grow at the same rate as the death of the preys. Lets study the growth of the populations for the parameter values a-2, b-0.8 c 0.75, d 0.3 . The function shall have the following interface, Task 5: Lorenz Butterfly (10 Pts) a) Write a MATLAB function Lorenz_butterfly.m that returns a system of differential equations known as the Lorenz butterfly, which is described by the following three differential equations dYldt--XZ+rX-Y which we shall study for parameters of: ?-10, b-8/3 , r-160. This is a chaotic system of ODEs (the original system studied) where solutions orbit around steady state points. This function, like all functions to be sent to ode_Kutta, has an interface of Valid call: dydx- Lorenz_butterfly(, y) Inputs: This is a homogeneous system of equations. It does not depend on x, hence the tilde. The dependent variable, which is a column vector. : : Output: dydx: The ODE, i.e., dy/dx - f(-, y) Validation: Your code should throw an error if any of the following are true: y is not a column vector of length 3 In your implementation, set y(1,-X, y(2) = Y; y(3)-Z where x will be time t. e v is not numeric b) Write a MATLAB function Predator_Prey.m that returns the rate of change of prey and predator populations as given by the differential equations given below, d X dt dt Here, X and Y are the number of prey and predators, a is the prey growth rate, c is the predator death rate, b and d indicate the effect of the interaction between the of the prey and the predators on their respective population. Note that the predator number do not necessarily grow at the same rate as the death of the preys. Lets study the growth of the populations for the parameter values a-2, b-0.8 c 0.75, d 0.3 . The function shall have the following interface

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!