p=[2.5;2.204678;10;0.0675;1;0.1;0.4]; ap1=[2]; [x0,v0]=init_EP_EP(@cataloscill,[0.001137;0.891483;0.062345],p,ap1); opt=contset; opt=contset(opt,'MaxStepSize',0.025); opt=contset(opt,'MaxNumPoints',78); opt=contset(opt,'Singularities',1); [x,v,s,h,f]=cont(@equilibrium,x0,[],opt); cpl(x,v,s,[4,1]); 'press any key' pause x1=x(1:3,s(3).index); p(ap1)=x(end,s(3).index); [x0,v0]=init_LP_LP(@cataloscill,x1,p,[2,7]); [x2,v2,s2,h2,f2]=cont(@limitpoint,x0,v0,opt); hold on; cpl(x2,v2,s2,[4,1]); 'press any key' pause opt=contset(opt,'Backward',1); [x3,v3,s3,h3,f3]=cont(@limitpoint,x0,v0,opt); hold on cpl(x3,v3,s3,[4,1]); 'press any key' pause x1=x(1:3,s(2).index); p(ap1)=x(end,s(2).index); [x0,v0]=init_H_H(@cataloscill,x1,p,[2 7]); opt=contset; opt=contset(opt,'Singularities',1); opt=contset(opt,'MaxStepsize',0.1); opt=contset(opt,'backward',0); [x4,v4,s4,h4,f4]=cont(@hopf,x0,v0,opt); hold on; cpl(x4,v4,s4,[4 1]);This set of commands is executed by the file testLPHopfcataloscill.m in the directory Testruns. The command line output is
>> testLPHopfcataloscill first point found tangent vector to first point found label = H , x = ( 0.016357 0.523973 0.328336 1.051558 ) First Lyapunov coefficient = 1.070259e+01 label = LP, x = ( 0.024717 0.450257 0.375018 1.042049 ) a=-1.166509e-01 label = LP, x = ( 0.054030 0.302241 0.459807 1.052200 ) a=1.346534e-01 label = H , x = ( 0.077929 0.233063 0.492149 1.040991 ) First Lyapunov coefficient = 4.332247e+00 elapsed time = 0.3 secs npoints curve = 78 ans = 'press any key' first point found tangent vector to first point found label = CP , x = ( 0.035941 0.352004 0.451371 1.006408 0.355991 ) c=3.627908e-01 label = BT , x = ( 0.115909 0.315467 0.288437 1.417627 0.971397 ) (a,b)=(8.378438e-02, 2.136279e+00) elapsed time = 0.5 secs npoints curve = 78 ans = 'press any key' first point found tangent vector to first point found label = BT , x = ( 0.016337 0.638410 0.200456 1.161199 0.722340 ) (a,b)=(-4.822577e-02, -1.937637e+00) elapsed time = 0.4 secs npoints curve = 78 ans = 'press any key' first point found tangent vector to first point found label = GH, x = ( 0.018022 0.368238 0.497968 0.891319 0.232487 0.003324 ) l2=-7.768956e+02 label = GH, x = ( 0.064311 0.211095 0.554870 0.924255 0.305879 0.003512 ) l2=-2.401240e+02 label = BT, x = ( 0.115909 0.315467 0.288437 1.417627 0.971396 0.000000 ) (a,b)=(8.378437e-02, 2.136280e+00) label = BT, x = ( 0.016337 0.638410 0.200456 1.161199 0.722339 0.000000 ) (a,b)=(-4.822564e-02, -1.937633e+00) Closed curve detected at step 159 elapsed time = 1.6 secs npoints curve = 159 >>The results are plotted in Figure 18 using the standard plot function cpl where the fourth argument is used to select the fourth and first components of the solution which are the parameter