畫frequency response和phase response(MATLAB))


修DSP時有學到system的frequency response,想要以matlab tool來畫增強對frequency response的感覺,以下以moving average system來當作例子:
matlab code(frequency response)如下:

omega = -2*pi:pi/400:2*pi;
H5 = ((1/5)*(1-exp(-1i*omega*5))./(1-exp(-1i*omega)));
plot(omega,abs(H5)), title('frequency response');

結果的圖如下

matlab code(phase response)如下:

omega = -2*pi:pi/400:2*pi;
H5 = ((1/5)*(1-exp(-1i*omega*5))./(1-exp(-1i*omega)));
plot(omega,angle(H5)), title('Phase plot');

結果的圖如下

#matlab







你可能感興趣的文章

每日心得筆記 2020-07-01(三)

每日心得筆記 2020-07-01(三)

AWS Solutions Architect - Associate (SAA) 學習計畫與備考心得: Module 2

AWS Solutions Architect - Associate (SAA) 學習計畫與備考心得: Module 2

[Day00] 大綱

[Day00] 大綱






留言討論