
实验四MATLAB求Laplace变换及逆变换(一)实验类型:综合性(二)实验类别:基础实验(三)实验学时数:2学时
实验四 MATLAB求Laplace变换及逆变换 (一) 实验类型:综合性 (二) 实验类别:基础实验 (三) 实验学时数:2学时

基本命令:1、拉普拉斯(laplace)变换命令: L=laplace(f,t,s)%求函数f(t)的laplace变换LL是s的函数,参数s省略,返回结果L默认为’s'的函数;f为t的函数,当参数t省略,默认自由变量为’t'.2、拉普拉斯(laplace)逆变换命令:L=ilaplace(f,t,s)%求L的laplace你逆变换f
基本命令: 1、拉普拉斯(laplace)变换 命令:L= laplace(f,t,s) %求函数f(t)的laplace变换L L是s的函数,参数s省略,返回结果L默认为 ’s’的函数; f为t的函数,当参数t省略,默认自由变量为’t’. 2、拉普拉斯(laplace)逆变换 命令:L=ilaplace(f,t,s) %求L的laplace你逆变换f

例1求阶跃函数Ut的laplace变换解:【Matlab源程序】syms t sUt=sym(Heaviside(t)");L=laplace(Ut)%结果为:L=1/s当t经位移变化时的laplace变换syms t s; syms b positive ;Ut=sym(Heaviside(t-b));L=laplace(Ut)%结果为: L=exp(-s*b)/s
解:【Matlab源程序】 syms t s Ut=sym('Heaviside(t)'); L=laplace(Ut) %结果为:L = 1/s 例1 求阶跃函数Ut的laplace变换 当t经位移变化时的laplace变换 syms t s; syms b positive ; Ut=sym('Heaviside(t-b)'); L=laplace(Ut) %结果为: L =exp(-s*b)/s

例2求函数Dt的laplace变换解【Matlab源程序】syms t sDt=sym(Dirac(t));L=laplace(Dt)%结果为: L=1当t经位移变化时的laplace变换syms t s; syms b positive ;Ut=sym(Heaviside(t-b));L=laplace(Ut)%结果为: L=exp(-s*b)
例2 求δ函数Dt的laplace变换 解【Matlab源程序】 syms t s Dt=sym('Dirac(t)'); L=laplace(Dt) %结果为:L = 1 当t经位移变化时的laplace变换 syms t s; syms b positive ; Ut=sym('Heaviside(t-b)'); L=laplace(Ut) %结果为: L =exp(-s*b)

例3求函数f(t)= e-at sin bt的laplace变换解【Matlab源程序】syms t s;syms a b positivef=[exp(-a*t)*sin(b*t)];L=laplace(f)%结果为:L=1/b/((s+a)^2/b^2+1)
解【Matlab源程序】 syms t s;syms a b positive f=[exp(-a*t)*sin(b*t)]; L=laplace(f) 例3 求函数 f(t) = e −atsinbt 的laplace变换 %结果为: L =1/b/((s+a)^2/b^2+1)

例4求函数f=sinwt的laplace变换解【Matlab源程序】syms t s;syms omegaf=sin(omega*t);L=laplace(f)%结果为:L=omega/(s^2+omega^2)
解 【Matlab源程序】 syms t s;syms omega f=sin(omega*t); L=laplace(f) 例4 求函数f=sinωt的laplace变换 %结果为: L =omega/(s^2+omega^2)

例5求下列【Matlab源程序】是哪个函数的laplace变换?syms t s;syms beta positiveg=sym('Dirac(t)");h=sym(Heaviside(t)');f=exp(-beta*t)*g-beta*exp(-beta*t)*h;L=simple(laplace(f)%结果为: L=s/(s+beta)
syms t s; syms beta positive g=sym('Dirac(t)'); h=sym('Heaviside(t)'); f=exp(-beta*t)*g-beta*exp(-beta*t)*h; L=simple(laplace(f)) %结果为: L =s/(s+beta) 例5 求下列【Matlab源程序】是哪个函数 的laplace变换?

求多个函数的laplace变换的【Matlab源程序】例6 求函数f=t*sin(a*t);g=t*cos(a*t);的laplace变换?解【Matlab源程序】syms ts af=t*sin(a*t);g=t*cos(a*t);L1=simple(simple(laplace(f)))L2=simple(expand(laplace(g))%结果为:L1=2/(s^2+a^2)^2*s*aL2 =1/(s^2+a^2)^2*(s^2-a^2)
解 【Matlab源程序】 syms t s a f=t*sin(a*t); g=t*cos(a*t); L1=simple(simple(laplace(f))) L2=simple(expand(laplace(g))) 求多个函数的laplace变换的【Matlab源程序】 例6 求函数f=t*sin(a*t);g=t*cos(a*t); 的laplace变换? %结果为: L1 =2/(s^2+a^2)^2*s*a L2 =1/(s^2+a^2)^2*(s^2-a^2)

或解:【Matlab源程序】)syms t s af=t*sin(a*t);g=t*cos(a*t);L1=simple(laplace(f)L2=simple(laplace(g))%结果为: L1=2/(s^2+a^2)^2*s*aL2 =1/(s^2+a^2)^2*(s^2-a^2)
或解:【Matlab源程序】 syms t s a f=t*sin(a*t); g=t*cos(a*t); L1=simple(laplace(f)) L2=simple(laplace(g)) %结果为: L1 =2/(s^2+a^2)^2*s*a L2 =1/(s^2+a^2)^2*(s^2-a^2)

例7求函数f=t*exp(a*t)*sin(a*t);g=t*exp(a*t)*cos(a*t)的laplace变换解【Matlab源程序】symsts af=t*exp(a*t)*sin(a*t);g=t*exp(a*t)*cos(a*t);L1=laplace(f)L2=simple(laplace(g)%结果为: L1=2/a^3/(s-a)^2/a^2+1)^2*(s-a)L2 =s*(s-2*a)/(s^2-2*s*a+2*a^2)^2
解 【Matlab源程序】 syms t s a f=t*exp(a*t)*sin(a*t); g=t*exp(a*t)*cos(a*t); L1=laplace(f) L2=simple(laplace(g)) 例7 求函数f=t*exp(a*t)*sin(a*t); g=t*exp(a*t)*cos(a*t); 的laplace变换 %结果为: L1 =2/a^3/((s-a)^2/a^2+1)^2*(s-a) L2 =s*(s-2*a)/(s^2-2*s*a+2*a^2)^2