How do I plot the attractor of a logistic map?

4 ビュー (過去 30 日間)
Gizella Kaszti
Gizella Kaszti 2018 年 2 月 25 日
回答済み: Chandani Madnani 2018 年 2 月 27 日
Hi there, I am trying to write a function to solve the following: x(n+1)= lamda*xn*(1-xn) I choose x(1) and "n" for how large xn gets.
Then, the input of the function is (lamda1,lamda2, N)
lamda is the linspace(lamda1,lamda2, N)
This is what I have so far: lamda=linspace(l1,l2,N); for ii=1:xn; x(ii+1)=lamda*x(ii)*(1-x(ii)); end
the error I get is: In an assignment A(:) = B, the number of elements in A and B must be the same.
then I must plot with x axis = lamda and y axis = xn
Please help, I need help! I am very new to matlab and Numerical analysis as well. Thanks!

回答 (1 件)

Chandani Madnani
Chandani Madnani 2018 年 2 月 27 日
Please share the exact code snippet and the error message that you receive. It is not very clear from the given description

カテゴリ

Help Center および File ExchangePulse and Transition Metrics についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by