View
162
Download
0
Category
Preview:
DESCRIPTION
实验四 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 )逆变换 - PowerPoint PPT Presentation
Citation preview
实验四 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 )逆变换 命令: L=ilaplace(f,t,s) % 求 L 的 laplace 你逆变换 f
解:【 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 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)
解【 Matlab 源程序】 syms t s;syms a b positive
f=[exp(-a*t)*sin(b*t)]; L=laplace(f)
例 3 求函数 的 laplace 变换 btsinetf at
% 结果为: L =1/b/((s+a)^2/b^2+1)
解 【 Matlab 源程序】syms t s;syms omega
f=sin(omega*t);
L=laplace(f)
例 4 求函数 f=sinωt 的 laplace 变换
% 结果为: L =omega/(s^2+omega^2)
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 变换?
解 【 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 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)
解 【 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
解【 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
例 8 求函数 f=int(x*exp(a*x)*sin(a*x),0,t);
的 laplace 变换
解【 Matlab 源程序】 syms t s
f=sin(t)/t;
L=laplace(f)
M=int(sin(t)/t,0,+inf)
例 9 求函数 f=sin(t)/t 的 laplace 变换及 dtt
tsin0
% 结果为: L =atan(1/s) M=1/2*pi
解 【 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
例 10 求函数 h=sym('Heaviside(5*t)'); g=sym('Heaviside(5*t-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))
例 11 求函数 F=1/(s^2+4*s+13)^2;
的 laplace 逆变换
解 【 Matlab 源程序】 syms t s
F=1/(s*(s-1)^2);
f=ilaplace(F)
例 12 求函数 F=1/(s*(s-1)^
2);
的 laplace 逆变换
% 结果为: f =1+(t-1)*exp(t)
解【 Matlab 源程序】 syms t s
F=s/((s+1)^3*(s-1)^2);
f=simple(ilaplace(F))
例 13 求函数 F=s/((s+1)^3*(s-1)^2)
的 laplace 逆变换
% 结果为:f = (1/16-1/8*t^2)*exp(-t)+(-1/16+1/8*t)*exp(t)
作业:
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 逆变换
Recommended