Integration of Torus.m Plot The Poincare Section Torus.m File - Two Uncoupled Oscilators With Omega1 2 and Omega2 3
Integration of Torus.m Plot The Poincare Section Torus.m File - Two Uncoupled Oscilators With Omega1 2 and Omega2 3
Integration of Torus.m Plot The Poincare Section Torus.m File - Two Uncoupled Oscilators With Omega1 2 and Omega2 3
integration of torus.m
calculation of poincare section
plot the poincare section
torus.m file - two uncoupled oscilators with omega1=2 and omega2=3
close;
clear;
ps=zeros(2,1);
integration of torus.m
http://lab.fs.uni-lj.si/lasin/www/teaching/chaotic/Poincare/poincare1.html#3 1/3
1/25/2018 Calculation and plot of the poincare section of two uncoupled osciators with omega1 and omega2 : omega1/omega2=p/q=rational -> closed orbi…
n=size(t);
%set the index of poincare points to 1
np=1;
for i=1:n(1)
% detect the cros-section of the trajectory with the plane y1-y2
if(y(i,3)>=(2*pi)*np)
% store detected cross-section point y1,y2 to ps1,ps2
ps(np,1)=y(i,1);
ps(np,2)=y(i,2);
% increase the index of poincare point
np=np+1;
end
end
for i=1:np-1
plot(ps(i,1),ps(i,2),'r+')
% use pause to folow the plot of the poincare section
%pause(2);
end
%plot(ps(:,1),ps(:,2),'r+');
%function dy=torus(t,y)
%dy=zeros(3,1);
%dy(1)=y(2);
http://lab.fs.uni-lj.si/lasin/www/teaching/chaotic/Poincare/poincare1.html#3 2/3
1/25/2018 Calculation and plot of the poincare section of two uncoupled osciators with omega1 and omega2 : omega1/omega2=p/q=rational -> closed orbi…
%dy(2)=-(omega1)*y(1);
%dy(3)=omega2;
http://lab.fs.uni-lj.si/lasin/www/teaching/chaotic/Poincare/poincare1.html#3 3/3