M=6 f1=0.08 f2=0.30
Signal #1Signal #22Amplitude2Amplitude10-1-2050Time index nInput Signal10010-1-2050Time index nOutput Signal1002Amplitude2Amplitude10-1-2050Time index n10010-1-2050Time index n100
Q2.19 运行 P2_5 生成的结果如下::
43Impulse Response2Amplitude10-1-2-30510152025Time index n303540
Q2.21 生成的MATLAB代码如下:
% Program Q2.21
% Compute the impulse response y clf; N = 40;
num = [0.9 -0.45 0.35 0.002]; den = [1.0 0.71 -0.46 -0.62]; % input: unit pulse x = [1 zeros(1,N-1)]; % output
y = filter(num,den,x); % Plot the impulse response
% NOTE: the time axis will be WRONG; h[0] will % be plotted at n=1; but this will agree with % the INCORRECT plotting that was also done % by program P2_5. stem(y);
xlabel('Time index n'); ylabel('Amplitude'); title('Impulse Response'); grid;
程序产生的40个样本如下所示:
Impulse Response21.51Amplitude0.50-0.5-1-1.50510152025Time index n303540
Q2.28 程序P2_7产生的序列 y[n] and y1[n] 如下所示:
20Output Obtained by ConvolutionAmplitude100-10-200246810Time index nOutput Generated by Filtering121420Amplitude100-10-2002468Time index n101214
① y[n] 和 y1[n] 的差别为--- 它们无差别。
②将x[n]补零后得到 x1[n]作为输入,产生y1[n]的原因是--对于长度N1和N2的两个序列,转化率返回得到的序列长度N1 + N2-1。与此相反,过滤器接受一个输入信号和一个系统规范。返回的结果是相同的长度作为输入信号。因此,为了从转化率和滤波器得到直接比较的结果,有必要供应滤波器的输入已经零填充为长度L(x)+L(h)-1。
程序P3_1计算离散时间傅里叶变换的原始序列为---H(e
j?Q3.1
2?z?1)= 1?0.6z?1
pause 命令的作用为- 不加参数,直接用pause的话,就是程序暂停,直至用户按任意一个按键。如果加参数,比如pause(1.5)就是程序暂停1.5秒。
Q3.2 程序 P3_1 运行结果为:
8AmplitudeReal part of H(e)j?6420-4-3-2-10? /?12344Amplitudej?Imaginary part of H(e)20-2-4-4-3-2-10? /?1234
8Magnitude Spectrum |H(e)|j?Amplitude6420-4-3-2-10? /?12342Phase Spectrum arg[H(ej?)]Phase in radians10-1-2-4-3-2-10? /?1234
DTFT 是关于 ?的周期函数么?答:DTFT是关于?的周期函数 周期是 2?
四个图形的对称性为:实部是2?周期和偶对称; 虚部是2?周期和奇对称;幅度
是2?周期和偶对称;相位是2?周期和奇对称性。
Q3.4 修改程序 P3_1 重做Q3.2的程序如下:
% Program Q3.4
% Evaluation of the DTFT clf;
% Compute the frequency samples of the DTFT w = -4*pi:8*pi/511:4*pi; num = [1 3 5 7 9 11 13 15 17]; den = 1;
h = freqz(num, den, w); % Plot the DTFT subplot(2,1,1)
plot(w/pi,real(h));grid
title('Real part of H(e^{j\\omega})') xlabel('\\omega /\\pi'); ylabel('Amplitude'); subplot(2,1,2)
plot(w/pi,imag(h));grid
title('Imaginary part of H(e^{j\\omega})') xlabel('\\omega /\\pi'); ylabel('Amplitude'); pause subplot(2,1,1) plot(w/pi,abs(h));grid
title('Magnitude Spectrum |H(e^{j\\omega})|') xlabel('\\omega /\\pi'); ylabel('Amplitude'); subplot(2,1,2) plot(w/pi,angle(h));grid
title('Phase Spectrum arg[H(e^{j\\omega})]') xlabel('\\omega /\\pi'); ylabel('Phase in radians');
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库DSP实验报告(2)在线全文阅读。
相关推荐: