⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex5_4.m

📁 Advanced Engineering Mathematics using MATLAB by Harman, Dabney, Richert,书中全部源码
💻 M
字号:
% EX5_4.M  Solve symbolically the second order equation%  D2y+b*Dy+c*y=0  and plot for b=1, b=3 with c=1.%  sym('b')y = dsolve('D2y+b*Dy+1*y=0','y(0)=1','Dy(0)=0','t');y=simple(y)                   % Simplify the solution% Substitute values b=1 and b=3clf                           % Clear any figures andhold on                       %  plot multiple graphsezplot(subs(y,'b',3.0),[0,10])gtext('b=3')                  % Annotate text with mouseezplot(subs(y,'b',1.0),[0,10])gtext('b=1')  title('Solution to D2y+b*Dy+y=0, y(0)=1,Dy(0)=0')ylabel('y(t)')gridhold off                       % Default setting%%  Make this script more general; i.e. plot arbitrary %    values of b and different ranges of t%% Version 5 Add sym and modify call to subs

⌨️ 快捷键说明

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