⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cw1.m

📁 some code use for dsb matlabe
💻 M
字号:
%discrete-time forier trasnform computation 
%read in the desired lenght dtft
k = 255
%seat in numerator and denumerator coefficiencs
num =[0.0518 -0.1553 0.1553 0.0518]
den =[1 1.282 1.0388 0.341]
%compute the frequency responce
w=0:pi/k:pi;
h=freqs(num,den,w);
%plot the frequency responcs
subplot(2,2,1)
plot(w/pi,real(h));grid
title('real part')
xlabel('\omega/\pi');ylabel('amplitude')
subplot(2,2,2)
plot(w/pi,imag(h));grid
title('imaginary part')
xlabel('\omega/\pi');ylabel('amplitude')
subplot(2,2,3)
plot(w/pi,abs(h));grid
title('magnitude spectrum')
xlabel('\omega/\pi');ylabel('magnitude')
subplot(2,2,4)
plot(w/pi,angle(h));grid
title('phase spectrum')
xlabel('omega/\pi');ylabel('phase,radians')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -