Involves MATLAB Problem 3: The Lorenz system of differential equations dx dy dt
ID: 3600697 • Letter: I
Question
Involves MATLAB
Problem 3: The Lorenz system of differential equations dx dy dt can be used as a simplified dynamical model of lasers, electric circuits, and chemical reactions. This is an example of an autonomous system demonstrating chaotic behavior and existence of attractors, i.e. regions in the phase space that "attract" phase trajectories corresponding to various initial conditions. In the case when = 28, = 10, and = 8/ 3, the attractor of the Lorenz system has a specific shape of a "three-dimensional butterfly" a. Write the Lorenz system using the matrix notation b. Prepare a MATLAB code to solve the Lorenz system numerically with RK4 method C. Find two solutions (trajectories) of this system at = 28, =10, and -8/3, with the integration step size t= 0.001 in the interval 0Sts 30 with initial conditions t = 0: x(0) = 30, y(0) = 30, z(0) = 10 t0:x(0)20 y(0)30, z(0)-70 d. Plot both trajectories in the same figure on the plane (x, z) in the form of e. Plot both trajectories in the same figure in the form of three-dimensional and two-dimensional curves. curves using the MATLAB function plot3 f. Can you see the attractor?Explanation / Answer
function loren3 clear;clf global A B R A = 10; B = 8/3; R = 28; u0 = 100*(rand(3,1) - 0.5); [t,u] = ode45(@lor2,[0,100],u0); N = find(t>10); v = u(N,:); x = v(:,1); y = v(:,2); z = v(:,3); plot3(x,y,z); view(158, 14) function uprime = lor2(t,u) global A B R uprime = zeros(3,1); uprime(1) = -A*u(1) + A*u(2); uprime(2) = R*u(1) - u(2) - u(1)*u(3); uprime(3) = -B*u(3) + u(1)*u(2);
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.