全文预览

离散时间系统的时域分析

上传者:hnxzy51 |  格式:doc  |  页数:7 |  大小:0KB

文档介绍
Р% Program P2_5Р% Compute the impulse response yРclf;РN = 45;Рnum = [0.9 -0.45 0.35 0.002];Рden = [1 0.71 -0.46 -0.62];Рy = impz(num,den,N);Р% Plot the impulse responseРstem(y);Рxlabel('Time index n'); ylabel('Amplitude');Рtitle('Impulse Response'); grid;Р运行结果:Р4.通过卷积得到有限冲激响应系统的输出序列Р程序如下:Р% Program P2_7Рclf;Рh = [3 2 1 -2 1 0 -4 0 3]; % impulse responseРx = [1 -2 3 -4 3 2 1]; % input sequenceРy = conv(h,x);Рn = 0:14;Рsubplot(2,1,1);Рstem(n,y);Рxlabel('Time index n'); ylabel('Amplitude');Рtitle('Output Obtained by Convolution'); grid;Рx1 = [x zeros(1,8)];Рy1 = filter(h,1,x1);Рsubplot(2,1,2);Рstem(n,y1);Рxlabel('Time index n'); ylabel('Amplitude');Рtitle('Output Generated by Filtering'); grid;Р运行结果:РYYyyР从运行结果可以看出,y[n]与y1[n]完全相同。卷积得到的输出序列长度是9+7-1=15,因此在用滤波器计算输出时要把输入序列进行零填充,通过补8个零使得序列的长度达到15。

收藏

分享

举报
下载此文档