matlab解二阶微分方程,解出的结果如下,请问怎样画出y和时间t的函数图像?

问题描述:

matlab解二阶微分方程,解出的结果如下,请问怎样画出y和时间t的函数图像?
y=dsolve('101*D2y+100*Dy+1000*y=102*sin(20*pi*t)','y(0)=0,Dy(0)=0','t')
解出的结果是
y=exp(-(50*t)/101)*sin((10*985^(1/2)*t)/101)*((51*985^(1/2)*exp((50*t)/101)*((50*sin(t*(20*pi - (10*985^(1/2))/101)))/101 - cos(t*(20*pi - (10*985^(1/2))/101))*(20*pi - (10*985^(1/2))/101)))/(9850*((20*pi - (10*985^(1/2))/101)^2 + 2500/10201)) + (51*985^(1/2)*exp((50*t)/101)*((50*sin(t*(20*pi + (10*985^(1/2))/101)))/101 - cos(t*(20*pi + (10*985^(1/2))/101))*(20*pi + (10*985^(1/2))/101)))/(9850*((20*pi + (10*985^(1/2))/101)^2 + 2500/10201))) - (51*cos((10*985^(1/2)*t)/101)*(99485*pi^2*sin(20*pi*t
- (10*985^(1/2)*t)/101) - (4925*sin(20*pi*t + (10*985^(1/2)*t)/101))/2 - (4925*sin(20*pi*t - (10*985^(1/2)*t)/101))/2 + 99485*pi^2*sin(20*pi*t + (10*985^(1/2)*t)/101) + 4925*pi*cos(20*pi*t - (10*985^(1/2)*t)/101) + 4925*pi*cos(20*pi*t + (10*985^(1/2)*t)/101) + (25*985^(1/2)*cos(20*pi*t - (10*985^(1/2)*t)/101))/2 - (25*985^(1/2)*cos(20*pi*t +

继续输入:
ezplot(y,[0,2]) % t∈[0,2]时的图像.
就出来了.想要得到某一点的y的值,输入
subs(y,'t',1) 就得到t=1时的y的值.敢问ezplot是什么意思啊?这个公式没见过啊。。ezplot是画符号表达式的函数,输入付号表达式会自动画图。subs是带入求值,令变量取某值,得出符号表达式的结果。