Matlab code and Strogatz histeresis example

4 ビュー (過去 30 日間)
Paulo
Paulo 2014 年 8 月 2 日
回答済み: Paulo 2014 年 8 月 5 日
Hi,
Iam trying to replicate Strogatz example for histeresis (figure3.4.5, page 59), but I couldnt plot the same bifurcation...
The code I did was the following
clear all;
global r;
ci=[1 ];
tspan=[0 6500];
for r=-3:0.1:2
[t,y] = ode113('histeresis', tspan, ci);
l=length(y)
a=l*0.45;
plot(r,((max(y(l-a:l,1)))),'.','Color','blue','Markersize',11);hold on;
plot(r,((min(y(l-a:l,1)))),'.','Color','blue','Markersize',11);hold on;
end
Where 'histeresis' is a separated function m file, as following:
function dydt = histeresis(t,y)
global r
dydt(1,1) = r*y(1)+y(1)^3-y(1)^5;
_____
Possible there some flaw in the code, or even some wrong interpretation by me of the histeresis simulation.
Please help!
Thank you alot.

回答 (1 件)

Paulo
Paulo 2014 年 8 月 5 日
Any ideas ?
Thank you!

カテゴリ

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