Bifurcation diagram for a non autonomous system.

3 ビュー (過去 30 日間)
LALE ASIK
LALE ASIK 2017 年 10 月 5 日
編集済み: LALE ASIK 2022 年 2 月 14 日
I am trying to draw a bifurcation diagram for a non-autonomous system. The code:
limit=[1400:1:1500];
ymin=[];
ymax=[];
for Ke=0:0.01:3;
[~,U]=ode45(@Onetwo,[0:1:1500],[0.5;0.25;1.5]);
u2=U(limit,2);
The system gives me the following error:
Index exceeds matrix dimensions.
Error in LKEbif (line 24)
u2=U(limit,2);

採用された回答

Jyotish Robin
Jyotish Robin 2017 年 10 月 10 日
Hi!
The reason for the error "Index exceeds matrix dimensions." in your piece of code is because U is an array of size 51 x 3 but you are trying to use 'limit' which range from 1400 to 1500 to index into U.
U(a,b) % will be valid only if a<52 and b<4 where a and b are positive integers OR Logicals.
In cases of trivial issues like this, I would suggest you to try debugging using breakpoints in MATLAB.
Hope this helps.
Regards,
Jyotish
  1 件のコメント
LALE ASIK
LALE ASIK 2017 年 10 月 15 日
Thank you so much.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by