1 / 17

实验四 MATLAB 求 Laplace 变换及逆变换

实验四 MATLAB 求 Laplace 变换及逆变换. (一) 实验类型:综合性 (二) 实验类别:基础实验 (三) 实验学时数: 2 学时. 基本命令 :. 1 、拉普拉斯( laplace )变换 命令: L= laplace(f,t,s)  % 求函数 f ( t )的 laplace 变换 L L 是 s 的函数,参数 s 省略,返回结果 L 默认为 ’ s’ 的函数; f 为 t 的函数,当参数 t 省略,默认自由变量为’ t’. 2 、拉普拉斯( laplace )逆变换

tanek
Télécharger la présentation

实验四 MATLAB 求 Laplace 变换及逆变换

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 基本命令: 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

  3. 例1 求阶跃函数Ut的laplace变换 解:【Matlab源程序】 syms t s Ut=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

  4. 例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)

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

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

  7. 例5 求下列【Matlab源程序】是哪个函数 的laplace变换? 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)

  8. 求多个函数的laplace变换的【Matlab源程序】 例6 求函数f=t*sin(a*t);g=t*cos(a*t); 的laplace变换? 解 【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))) %结果为: L1 =2/(s^2+a^2)^2*s*a L2 =1/(s^2+a^2)^2*(s^2-a^2)

  9. 或解:【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)

  10. 例7 求函数f=t*exp(a*t)*sin(a*t); g=t*exp(a*t)*cos(a*t); 的laplace变换 解 【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)) %结果为: 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

  11. 例8 求函数f=int(x*exp(a*x)*sin(a*x),0,t); 的laplace变换 解【Matlab源程序】 syms t s x a f=int(x*exp(a*x)*sin(a*x),0,t); L=simple(laplace(f)) %结果为: L =2*a*(s-a)/(s^2-2*s*a+2*a^2)^2/s

  12. 例9 求函数f=sin(t)/t的laplace变换及 解【Matlab源程序】 syms t s f=sin(t)/t; L=laplace(f) M=int(sin(t)/t,0,+inf) %结果为:L =atan(1/s) M=1/2*pi

  13. 例10 求函数h=sym('Heaviside(5*t)'); g=sym('Heaviside(5*t-2)'); 的laplace变换 解 【Matlab源程序】 syms t s h=sym('Heaviside(5*t)'); g=sym('Heaviside(5*t-2)'); L1=laplace(h) L2=simple(laplace(g)) %简化 %结果为:L1 =1/s L2 =exp(-2/5*s)/s

  14. 例11 求函数F=1/(s^2+4*s+13)^2; 的laplace逆变换 解 【Matlab源程序】 syms t s F=1/(s^2+4*s+13)^2; f=simple(ilaplace(F)) %简化 %结果为: f = -1/54*exp(-2*t)*(-sin(3*t)+3*t*cos(3*t))

  15. 例12 求函数F=1/(s*(s-1)^2); 的laplace逆变换 解 【Matlab源程序】 syms t s F=1/(s*(s-1)^2); f=ilaplace(F) %结果为:f =1+(t-1)*exp(t)

  16. 例13 求函数F=s/((s+1)^3*(s-1)^2) 的laplace逆变换 解【Matlab源程序】 syms t s F=s/((s+1)^3*(s-1)^2); f=simple(ilaplace(F)) %结果为: f = (1/16-1/8*t^2)*exp(-t)+(-1/16+1/8*t)*exp(t)

  17. 作业: 1、求函数f=cosωt的laplace变换 2、求函数f=sin(t)cos(t)的laplace变换 3、求函数F=1/(s*(s-1)^2) 的laplace逆变换 4、求函数F=1/(s^2+4)的laplace逆变换

More Related