文件名称:matlab实验4.doc
文件大小:276KB
文件格式:DOC
更新时间:2023-01-16 19:34:02
MATLAB英文版 含代码
MATLAB实验四 Section: Laboratory Exercise 4 LINEAR, TIME-INVARIANT DISCRETE-TIME SYSTEMS: FREQUENCY-DOMAIN REPRESENTATIONS 4.1 TRANSFER FUNCTION AND FREQUENCY RESPONSE Project 4.1 Transfer Function Analysis Answers: Q4.1 The modified Program P3_1 to compute and plot the magnitude and phase spectra of a moving average filter of Eq. (2.13) for 0 2 is shown below: w=0:pi/511:2*pi; M=input('M= '); num=ones(1,M)/M; h=freqz(num,1,w); subplot(2,1,1); plot(w/pi,abs(h));grid; title('H(e^{j\omega})幅度谱'); xlabel('\omega/\pi');ylabel('振幅'); subplot(2,1,2); plot(w/pi,angle(h));grid; title('相位谱 H(e^{j\omega})'); xlabel('\omega/\pi');ylabel('以弧度为单位的相位');