# Matlab Code for Tent Map and Histograms of Chaos Sequences

## Question

1: write the matlab code for tent map: Let 0<b<=1. Let f(x)=bx for x<1/2 and f(x)=b(1-x) for x>=1/2. Make a vector with the numbers xn in it and plot that vector.
2: write matlab code for Histograms of chaos sequences xn+1 = f(xn) where f(x) =r x(1-x). Divide [0,1] into n sub-intervals of length 1/n "bins". Iterate for a random initial condition x0 and count how times xn lies each of these. Plot a histogram of the percent of times each bin is visited.

## Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

function hist_logistic(r,x0,N,n_bins)
%Inputs
% r -- the coefficient of f(x)=rx(1-x); r should be in the range of 0 to 4
% x0 -- initial condition (.5 default)
% N -- the number of iterates for which to draw the cobweb (100 default)
% n_bins -- number of bins to use in the histogram. (100 default)
%   Usage:
%   hist_logistic(3.99,.5,100000)...

This is only a preview of the solution. Please use the purchase button to see the entire solution

\$13.00

or free if you
register a new account!

## Related Homework Solutions

Health Literacy (14 slides)
\$63.00
Healthcare
NVL
Health Literacy
WRAT
REALM
Behavior
Patient
NAAL Assessment
TOFHLA
Health Literacy (13 slides)
\$63.00
Population
Health Literacy
Communication
Decision Making
Information
Outcome
Partnership
Health Literacy (370 words)
\$25.00
Communication
Malpractice
Patient
Lawsuit
Health Literacy
Medical Error
Minority
Care Plan
Matlab Coding
\$3.00
Cobweb
Matlab
Code
Tent Map
Plot
Vector
Coefficient
Iterate
Initial Condition
Range
Risk and Emergency Management Questions
\$30.00
Risk
Emergency Management
Proximity to Risk
Severity of Risk
Disaster
Risk Communication
Politics Question
\$95.00
Democratic protest
EU
Parliament Sovereignity
Public Order
Rule of Law
Human Rights
Live Chats