function xpunto=croq3(t,theta) xpunto1=theta(2); xpunto2=-B0*sin(theta(1))-B1*sin(theta(3)-theta(1))-b*theta(2); xpunto3=omega; xpunto=[xpunto1;xpunto2;xpunto3] endfunction delta=0.5; B0=0.5; B1=0.40; b=0.1; x0=[0.5;0;0]; omega=1; t=0:0.1:400; theta=ode(x0,0,t,croq3); x0(1)=x0(1)+delta; theta1=ode(x0,0,t,croq3); x0(1)=x0(1)+delta; theta2=ode(x0,0,t,croq3); xyzplot=theta'; xyzplot1=theta1'; xyzplot2=theta2'; y=fft(xyzplot(:,1)); for i=1:1:40 xyzplot(find(xyzplot(:,1)>%pi))=xyzplot(find(xyzplot(:,1)>%pi))-2*%pi; xyzplot1(find(xyzplot1>%pi))=xyzplot1(find(xyzplot1>%pi))-2*%pi; xyzplot2(find(xyzplot2>%pi))=xyzplot2(find(xyzplot2>%pi))-2*%pi; //lya=((xyzplot(3:size(xyzplot,1),1:2)-xyzplot1(3:size(xyzplot,1),1:2))/delta); end scf(); plot2d(1:size(xyzplot,1),log10(abs(y))); scf(); plot(xyzplot(:,1),xyzplot(:,2),'.',xyzplot1(:,1),xyzplot1(:,2),'.',xyzplot2(:,1),xyzplot2(:,2),'.','markersize',1); //plot(xyzplot(:,1),xyzplot(:,2),xyzplot1(:,1),xyzplot1(:,2),xyzplot2(:,1),xyzplot2(:,2)); //scf(); //plot3d(xyzplot(:,1),xyzplot(:,2),xyzplot(:,3),flag=[0,2,2])