ex5_7.m

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

M
16
字号
% EX5_7.M  Symbolic solution of the second order equation%    'D2y+3*Dy+2*y=f(t)'yeq='D2y+3*Dy+2*y=f(t)'     % Define equation for dsolve y=dsolve(yeq,'t');          % Solve the equationpretty(y)                   %   and simplify the result%%  Try this with various forms of f(t) such as%    f(t) = const; f(t) = exp(-.5*t), etc.%  Here is an example pauseyeq='D2y+3*Dy+2*y=exp(-.5*t)'  % Define equation for dsolve y=dsolve(yeq,'t');             % Solve the equationpretty(y)                      %   and simplify the result%%   - You could make the script very general; input f(t)%         and the coefficients

⌨️ 快捷键说明

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