Matlab code and Strogatz histeresis example
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!