Matlab code and Strogatz histeresis example
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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.
0 comentarios
Respuestas (1)
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!