求出其特征根,pl2p2,及相应的留数 rl,r2,则冲激响应为 N()= Gxn+以G t 2)输出y(t)可用输入x(t)与冲激响应h(的卷积求 得
• 求出其特征根,p1,p2,及相应的留数 r1,r2,则冲激响应为 p t p t h t r e r e 1 2 1 2 ( ) = + 2)输出y(t)可用输入x(t)与冲激响应h(t)的卷积求 得
c clear. close a a=[1,2,8]b=1; dt=0.1 t=0: dt 5 X=38t+tcOS(0.1*t); r,p=residue(b, a); h=r(1)*exp(p(1)*t)+r(2)*exp(pP(2)*t) subplot(2, 1, 1),plot(t, h); grid y=conv(x, h)*dt subplot(2, 1, 2),plot(t y(:length (t)); grid
• Clc,clear,close all • a=[1,2,8];b=1; • dt=0.1 • t=0:dt:5; • x=3*t+cos(0.1*t); • [r,p]=residue(b,a); • h=r(1)*exp(p(1)*t)+r(2)*exp(p(2)*t); • subplot(2,1,1),plot(t,h);grid • y=conv(x,h)*dt; • subplot(2,1,2),plot(t,y(1:length(t)));grid
1、几个四舍五入的函数 a=[-1.9,-0.2,3.4,5.6,24+3.61] 1、F= floor(a) 向-∞方向舍入为整数。 F=-2.0000-1.00003.0000500002.0000+3.00001 2、A=ceil(a) 向∞方向舍入为整数。 A=-1.000004.0000600003.0000+4.00001
1、几个四舍五入的函数 • a = [-1.9, -0.2, 3.4, 5.6, 2.4+3.6i] • 1、F=floor(a) • 向-方向舍入为整数。 • F = -2.0000 -1.0000 3.0000 5.0000 2.0000 + 3.0000i • 2、A=ceil(a) • 向方向舍入为整数。 • A = -1.0000 0 4.0000 6.0000 3.0000 + 4.0000i
a=[-1.9,-0.2,3.4,5.6,2.4+3.61] 3、C=fx(a) 向0四舍五入 ·C=-1.000003.00005.00002.0000+3.0000i 4、R= round(a) ·R=-2.000003.00006.000020000+4.0000i b=[-1.95,-0.24,346,56,24+36il??
• a = [-1.9, -0.2, 3.4, 5.6, 2.4+3.6i] • 3、C=fix(a) • 向0四舍五入 • C =-1.0000 0 3.0000 5.0000 2.0000 + 3.0000i • 4、R=round(a) • R = -2.0000 0 3.0000 6.0000 2.0000 + 4.0000i • b= [-1.95, -0.24, 3.46, 5.6, 2.4+3.6i]??
62、傅立叶分析 例67方波分解为多次正弦波之和 图6.7.1给出的方波图形,其傅立叶级数为 f()=-[snt+sn3t+…+ 2h-lSm(2k-1)+… k=1,2,3.. 用 Matlab演示谐波合成情况 解:方波f(t)的周期T=2兀,由于该方波为奇对称, 在t=0~π间演示即可,分别计算 f(t=-sin t f(t)=-(sin t+-sin 3t)
6.2、傅立叶分析 • 例6.7 方波分解为多次正弦波之和 • 图6.7.1给出的方波图形,其傅立叶级数为 sin( 2 1) ...] 1,2,3... 2 1 1 sin 3 ... 3 1 [sin 4 ( ) − + = − = + + + k t k k f t t t , 用Matlab演示谐波合成情况 解:方波f(t)的周期T=2,由于该方波为奇对称, 在t=0 间演示即可,分别计算 ...... sin 3 ) 3 1 (sin 4 ( ) sin 4 ( ) 3 1 f t t t f t t = + =