3.分别用ode45和ode15s求解Van-del-Pol方程

问题描述:

3.分别用ode45和ode15s求解Van-del-Pol方程

clear all
global mu
mu=1;
y0=[0 1];
options = odeset('AbsTol',1e-8);
[T Y]=ode45('Vandelpol',[0 100],y0,options);
plot(T,Y(:,1))
%%%%%%%%%%%%%%%%%%%
function dy=Vanderpol(t,y)
global mu
dy=zeros(2,1);
dy(1)=y(2);
dy(2)=mu*(1-y(1)^2)*y(2)-y(1);