用matlab命令求微分方程d^2y/dx^2+2*dy/dx+2y=o,满足初始条件y(0)=1,dy/dx(0)=0的解,并绘制出方程解y(t)的时间曲线图
问题描述:
用matlab命令求微分方程d^2y/dx^2+2*dy/dx+2y=o,满足初始条件y(0)=1,dy/dx(0)=0的解,并绘制出方程解y(t)的时间曲线图
答
y=dsolve('D2y+2*Dy+2*y=0','y(0)=1,Dy(0)=0');
t=0:0.01:20;
y=eval(y);
plot(t,y)
祝你学习愉快!