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 +
挪威没有森林 1年前 已收到1个回答 举报

jsyzyuankai 幼苗

共回答了22个问题采纳率:81.8% 举报

继续输入:
ezplot(y,[0,2]) % t∈[0,2]时的图像.
就出来了.想要得到某一点的y的值,输入
subs(y,'t',1) 就得到t=1时的y的值.

1年前 追问

7

挪威没有森林 举报

敢问ezplot是什么意思啊?这个公式没见过啊。。

举报 jsyzyuankai

ezplot是画符号表达式的函数,输入付号表达式会自动画图。subs是带入求值,令变量取某值,得出符号表达式的结果。
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 17 q. 2.331 s. - webmaster@yulucn.com