p5_15.m

来自「Advanced Engineering Mathematics using M」· M 代码 · 共 22 行

M
22
字号
% P5_15.M Solve differential equation%  (Requires Symbolic Math Toolbox)%  Uses gtext to annotate graphsclearclfy=dsolve('a*D2y+b*Dy+890*y=0','y(0)=0.15','Dy(0)=0','t');y=subs(y,'a',9.082)  % Or use 9208/1000 since dsolve rejects floating pt.%hold onezplot(subs(y,'b',200),[0,1])gtext('b=200')      % Label the curve with mouse clickezplot(subs(y,'b',179.8),[0,1])gtext('b=179.8')ezplot(subs(y,'b',100),[0,1])gtext('b=100') title('Solution to 9.082*D2y+b*Dy+890*y')ylabel('y(t)')hold off%% Improve the titles and labeling of the graphs.%% Version 5  Changed called to subs

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?