Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB Code The Logistic Map (y=h*y*(1-y)) Conduct 4000 runs of the logistic map going through 1000 timesteps each, with each run using a different h

MATLAB Code

The Logistic Map (y=h*y*(1-y))

Conduct 4000 runs of the logistic map going through 1000 timesteps each, with each run using a different h parameter value from 0 to 4 in steps of .001 From each run, save the last 40 values of y (which will be kept track of with variable x). And then plot them all to show the classic bifurcation plot of the logistic map.

The following English instructions should be translated into matlab code:

clear all variables

start a for loop where h goes from

1 to 4000,

set your saved- value counter, x, to zero

set the iterated value, y, to start at a random number between 0 and 1

start a for loop where t (for timestep) goes from 1 to 1000

iterate the new value of y using the logistic map equation

(e.g.,y=h*y*(1-y)) (but make sure h is scaled to a range of .001 to 4, not 1 to 4000)

if the timestep variable is greater than 960, increment x up by 1 because we're saving these y values

save y in a matrix with h rows and x columns

bring if statement to an end

bring timestep loop to an end

bring h loop to an end

plot the matrix with all h rows and all x columns

(you may need to adjust the MarkerSize to get small dots)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

How are members held accountable for serving in the assigned roles?

Answered: 1 week ago