拉普拉斯(laplace)积分变换在工程、应用数学等方面都有重要的作用。用Matlab求解更加方便。
1、拉普拉斯(laplace)变换
语法:F= laplace(f,t,s) %求时域函数f(t)的laplace变换F
F是s的函数,参数s省略,返回结果F默认为’s’的函数;f为t的函数,当参数t省略,默认自由变量为’t’。
2、拉普拉斯(laplace)反变换
语法:F=i laplace(f,t,s) %求F的laplace反变换f
下面是本人今天帮朋友做题时,自己写的matlab语句,均可执行:
syms s t ;
e = sym(\'heaviside(t)\'); % 单位阶跃函数heaviside(t-a)
u = sym(\'dirac(t)\'); % 单位脉冲函数dirac(x-a)
%LF = laplace((4*t+5)*u);
%LF = laplace((t+2)*e);
%LF = laplace(sin(5*t+pi/3)*e);
%LF = laplace(sin(t));
%LF = laplace((15*(t*t)+4*t+6)*u);
%LF = laplace(sym(\'heaviside(t-2)\'));
%LF = laplace(sym(\'heaviside(t-pi/4)\'));
%LF = laplace(6*sin(3*t-pi/4).*sym(\'heaviside(t-pi/4)\'));
%F1=laplace(sin(a*t),t,s) %求sin(at)函数的laplace变换
%F2=laplace(sym(\'heaviside(t)\')) %求阶跃函数的laplace变换(heaviside(t) 阶跃函数)
%f1=ilaplace(1/(s+a),s,t) %求1/(s+a)函数的laplace反变换
%f1=ilaplace(1,s,t) %求1函数的laplace反变换是脉冲函数dirac(t)
%cs=sym(\'4/(s^2+2*s+4)\')*laplace(sym(\'Heaviside(t)\'));
%ft=ilaplace(cs)