Help with a bifurcation diagram plot

1 回表示 (過去 30 日間)
anna
anna 2022 年 10 月 2 日
コメント済み: anna 2022 年 10 月 2 日
Hello, I am trying to run a script for the following function:
my main issue is that the matrix multiplication cannot be done because there are different sizes, however I have no clue how to proceed and how to make the arrays the correct sizes.
this is the error i get:
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix
matches the number of rows in the second matrix. To perform elementwise multiplication, use '.*'.
Error in bifurcationexercise (line 11)
xtime(t+1)=(lambda*xtime)/((1+xtime).^beta);
I would like to add tha beta is supposed to be a constant, but i don't know how to specify the dimenstions of the matrices for lambda and xt as they should be 0<lambda<125 and -0.1<xt<5.0, the text suggests to do a resolution of 400 and N=300, however I am no clue what this means.
I apologize for I am just starting out with matlab and I am sure most of my errors come from me never having used the program before, but if you could help me somehow I would be really glad!
For reference, this is the graph I wish to obtain:
Thanks a lot.

採用された回答

VBBV
VBBV 2022 年 10 月 2 日
lambda = linspace(0,125,100)
xt = linspace(-0.1,5,100)
  2 件のコメント
VBBV
VBBV 2022 年 10 月 2 日
編集済み: VBBV 2022 年 10 月 2 日
Make the vectors lambda and xt of same size using linspace function
x(t+1) = (lambda.*xt)./(1+xt).^beta;
anna
anna 2022 年 10 月 2 日
thank you so much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by