Matlab code and Strogatz histeresis example

3 views (last 30 days)
Paulo
Paulo on 2 Aug 2014
Answered: Paulo on 5 Aug 2014
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.

Answers (1)

Paulo
Paulo on 5 Aug 2014
Any ideas ?
Thank you!

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!