DSP实验报告(一)之离散时间信号和系统的时域分析

阅读: 评论:0

DSP实验报告(一)之离散时间信号和系统的时域分析

DSP实验报告(一)之离散时间信号和系统的时域分析

一、产生如下因果线性时不变系统的冲激响应的前45个样本并绘图:

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; 

二、对序列 和 求卷积生成 ,并用FIR滤波器 对输入 滤波,求得 ; 和 有差别吗?为什么要使用对 补零后得到的 作为输入来产生 ?

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;

两者图像没有差别。

之所以要x补零,是因为filter的原因。H共9个数,x共7个数,卷积后15个。Filter最后的结果个数是和x相等的,所以要对x补8个0,再加入filter才能得到正确的结果。

本文发布于:2024-01-30 04:19:11,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170655955619163.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:时域   信号   时间   报告   系统
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23