%EXERCICIO CICLO close all clear all x0=[-2,-2]; t=0:1e-1:50; d1=.5; for i1=0:d1:4 for i2=0:d1:4 [T,x]=ode23(@ciclo,t,[x0(1)+i1,x0(2)+i2]); x1=x(:,1); x2=x(:,2); if x0(1)+i1==0 && x0(2)+i2==0 plot(x1,x2,'*r') hold on else plot(x1,x2,'--') hold on end end end x1v=-2:.1:2; x2v=-2:.1:2; mu=1 [x1v,x2v]=meshgrid(x1v,x2v); V=x1v.^2+x2v.^2; figure surf(x1v,x2v,V) Vp=2*V.*(mu-V); figure surf(x1v,x2v,Vp)