Question: MATLAB CODE Plot the Lorenz Attractor Translate from English into Matlab: Clear all variables Set your sigma parameter to 10 Set your beta parameter to

MATLAB CODE

Plot the Lorenz Attractor

Translate from English into Matlab:

Clear all variables Set your sigma parameter to 10 Set your beta parameter to 8/3 Set your p parameter to 28 Have x start at a random value between 10 and 10 Have y start at a random value between 10 and 10 Have z start at a random value between 10 and 10

Start a for loop where t goes from 1 to 5000 Update the value of x via its equation (scaling the change by .01) Update the value of y via its equation (scaling the change by .01) Update the value of z via its equation (scaling the change by .01) Save this new value of x in the tth element of allx Save this new value of y in the tth element of ally Save this new value of z in the tth element of allz

Bring the for loop to an end

Make a 3-D plot of allx, ally, and allz Rotate the view of this plot so that the azimuth and elevation show the Lorenz attractor in its full glory.

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!