📄 p3_1.m
字号:
% Program P3_1% Evaluation of the DTFT clf;% Compute the frequency samples of the DTFTw = -4*pi:8*pi/511:4*pi;num = [2 1];den = [1 -0.6];h = freqz(num, den, w);% Plot the DTFTsubplot(2,1,1)plot(w/pi,real(h));gridtitle('Real part of H(e^{j\omega})')xlabel('\omega /\pi');ylabel('Amplitude');subplot(2,1,2)plot(w/pi,imag(h));gridtitle('Imaginary part of H(e^{j\omega})')xlabel('\omega /\pi');ylabel('Amplitude');pausesubplot(2,1,1)plot(w/pi,abs(h));gridtitle('Magnitude Spectrum |H(e^{j\omega})|')xlabel('\omega /\pi');ylabel('Amplitude');subplot(2,1,2)plot(w/pi,angle(h));gridtitle('Phase Spectrum arg[H(e^{j\omega})]')xlabel('\omega /\pi');ylabel('Phase in radians');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -