8x 10Two N-point DFT's646x 10Two N-point DFT'sRe{H[k]}42006Im{H[k]}100200Freq index k300620-2-406100200Freq index k3008x 10Single N-point DFT4x 10Single N-point DFTRe{H[k]}4200100200Freq index k300Im{H[k]}620-2-40100200Freq index k300
Q3.26 在函数circshift中,命令rem的作用是什么?
答:rem(x,y)是用y对x求余数函数。
Q3.27 解释函数circshift怎样实现圆周移位运算。
答:在输入序列x由M的位置开始被循环移位。如果M> 0,则circshift删除从矢量x最左边开始的M个元素和它们附加在右侧的剩余元素,以获得循环移位序列。如果如果M<0,则circshift首先通过x的长度来弥补M,即序列x最右边的长度的M样品从x中删除和所附在其余的M个样本的右侧,以获得循环移位序列。 Q3.28 在函数circshift中,运算符~=的作用是什么? 答:~=是不等于的意思。
Q3.29 解释函数circonv怎样实现圆周卷积运算。
答:输入是两个长度都为L的向量x1和x2,它是非常有用的定期延长X2的函数。让x2p成为x2延长无限长的周期的序列。从概念上讲,在定点时间上通过时序交换后的x2p的长度L交换x2p序列和x2tr等于1的元素。然后元素1至L的输出向量y是通过取x1和获得的长度为L的sh矢量之间的内积得到通过循环右移的时间反转向量x2tr。对于输出样本Y[n]的1≤N≤L时,右循环移位的量为n-1个位置上。
Q3.36 运行程序P3.9并验证离散傅里叶变换的圆周卷积性质。
% Program P3.9
% Circular Convolution Property of DFT g1 = [1 2 3 4 5 6]; g2 = [1 -2 3 3 -2 1]; ycir = circonv(g1,g2);
disp('Result of circular convolution = ');disp(ycir) G1 = fft(g1); G2 = fft(g2); yc = real(ifft(G1.*G2));
disp('Result of IDFT of the DFT products = ');disp(yc)
Result of circular convolution = 12 28 14 0 16 14
Result of IDFT of the DFT products =
12 28 14 0 16 14
一个圆周卷积的DTF是DTF的逐点产物。
Q3.38 运行程序P3.10并验证线性卷积可通过圆周卷积得到。
% Program P3.10
% Linear Convolution via Circular Convolution g1 = [1 2 3 4 5];g2 = [2 2 0 1 1]; g1e = [g1 zeros(1,length(g2)-1)]; g2e = [g2 zeros(1,length(g1)-1)]; ylin = circonv (g1e,g2e);
disp('Linear convolution via circular convolution = ');disp(ylin); y = conv(g1, g2);
disp('Direct linear convolution = ');disp(y)
Linear convolution via circular convolution =
2 6 10 15 21 15 7 9 5
Direct linear convolution =
2 6 10 15 21 15 7 9 5
使用圆周卷积确实有可能得到线性卷积
Q3.40 编写一个MATLAB程序,对两个序列做离散傅里叶变换,已生成他们的线性卷积。用此程序验证Q3.38和Q3.39的结果 编写的MATLAB程序:
% Program Q3.40
% Linear Convolution via Circular Convolution g1 = [1 2 3 4 5]; g2 = [2 2 0 1 1];
g1e = [g1 zeros(1,length(g2)-1)]; g2e = [g2 zeros(1,length(g1)-1)]; G1EF = fft(g1e); G2EF = fft(g2e);
ylin = real(ifft(G1EF.*G2EF));
disp('Linear convolution via DFT = ');disp(ylin);
Linear convolution via DFT =
2.0000 6.0000 10.0000 15.0000 21.0000 15.0000 7.0000 9.0000 5.0000
Q3.46 使用程序P3.1在单位圆上求下面的z变换:
2?5z?1?9z?2?5z?3?3z?4 G(z)= ?1?2?3?45?45z?2z?z?z
Q3.47 编写一个MATLAB程序,计算并显示零点和极点,计算并显示其因式形式,并产生z
?1的两个多项式之比的形式表示的z变换的极零点图。使用该程序,分析式(3.32)的z变换
G(z)。
编写的MATLAB程序:
% Program Q3_47
clf;
% initialize num = [2 5 9 5 3]; den = [5 45 2 1 1];
% compute poles and zeros and display [z p k] = tf2zpk(num,den); disp('Zeros:'); disp(z);
disp('Poles:'); disp(p);
input('Hit
input('Hit
运行结果:
Zeros:
-1.0000 + 1.4142i -1.0000 - 1.4142i -0.2500 + 0.6614i -0.2500 - 0.6614i
Poles:
-8.9576 -0.2718 0.1147 + 0.2627i 0.1147 - 0.2627i
sos =
1.0000 2.0000 3.0000 1.0000 9.2293 2.4344 1.0000 0.5000 0.5000 1.0000 -0.2293 0.0822 k =
0.4000
432Imaginary Part10-1-2-3-4-8-6-4Real Part-20
Q3.48 通过习题Q3.47产生的极零点图,求出G(z)的收敛域的数目。清楚地显示所有的收敛域。由极零点图说明离散时间傅里叶变换是否存在。
R1 : | z | < 0.2718 (left-sided, not stable)
R2 : 0.2718 < | z | < 0.2866 (two-sided, not stable) R 3: 0.2866 < | z | < 8.9576 (two-sided, stable) R4 : | z | > 8.9576 (right-sided, not stable)
不能从极零点图肯定的说DTFT是否存在,因为其收敛域一定要指定。当收敛域在上述R 3内所获得的序列却是证明了DTFT的存在,它是一个具有双面冲激响应的稳定系统。
Q3.50 编写一个MATLAB程序,计算一个有理逆z变换的前L个样本,其中L的值由用户通过命令input提供。用该程序计算并画出式(3.32)中G(z)的逆变换的前50个样本。使用命令stem画出由逆变换产生的序列。
编写的MATLAB程序:
% Program Q3.50 clf;
% initialize num = [2 5 9 5 3]; den = [5 45 2 1 1];
% Query user for parameter L
L = input('Enter the number of samples L: '); % find impulse response [g t] = impz(num,den,L);
%plot the impulse response stem(t,g);
title(['First ',num2str(L),' samples of impulse response']); xlabel('Time Index n'); ylabel('h[n]');
Enter the number of samples L: 50
20-2-4-6-8-10-12-14-16x 1045First 50 samples of impulse responseh[n]0102030Time Index n4050
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库DSP实验报告(4)在线全文阅读。
相关推荐: