结果:
代码:
clear allclc
f=@(x,y)([y(2); 0.357*y(1)-0.1905*y(1)*y(2)]);[x,Y]=ode45(f,[0 100],[3 0]);plot(x,Y(:,1),x,Y(:,2)),legend('y','dy/dt')xlabel('x')