matlab解二阶微分方程d2x/dt2-(1-x^2)*dx/dt+x=0,初始条件,x(0)=1,x'(0)=0

问题描述:

matlab解二阶微分方程d2x/dt2-(1-x^2)*dx/dt+x=0,初始条件,x(0)=1,x'(0)=0

clear;clc
[t,x]=ode45(@(t,x)[x(2);(1-x(1)^2)*x(2)-x(1)],[0 10],[1 0]);
plot(t,x(:,1))