实验二:离散时间信号与系统的频域分析 内容一:M=256; n=0:9; x=0.5.^n; k=-M:M-1; w=(2*pi/M)*k; X=x*(exp(-j*2*pi/M)).^(n'*k); magX=abs(X); phaseX=angle(X); subplot(1,2,1); plot(w/pi,magX); xlabel('\omega/\pi'); subplot(1,2,2); plot(w/pi,phaseX); xlabel('\omega/\pi'); ylabel('\phi(\omega)'); grid; 内容二:k=256; num=[0.8,-0.44,0.36,0.02]; den=[1,0.7,-0.45,-0.3]; w=0:pi/k:pi; h=freqz(num,den,w); subplot(2,2,1); plot(w/pi,real(h)); grid; title('êμ2¿'); xlabel('\omega/\pi'); ylabel('·ù¶è'); subplot(2,2,2); plot(w/pi,imag(h)); grid; title('Dé2¿'); xlabel('\omega/\pi'); ylabel('·ù¶è'); subplot(2,2,3); plot(w/pi,abs(h)); grid; title('·ù¶èÆ×'); xlabel('\omega/\pi'); ylabel('·ù¶è'); subplot(2,2,4); plot(w/pi,angle(h)); grid; title('ÏàλÆ×'); xlabel('\omega/\pi'); ylabel('»¡¶è');
|