📄 s671.m
字号:
%
% s671.m - MATLAB script in Section 6.7.1
%
% Filter specifications
%
Fs=8000; % Sampling frequency 8 kHz
fc=800; % Passband cutoff frequency 800 Hz
fs=1600; % Stopband frequency 1.6 kHz
Rp=1; % Passband ripple in dB
Rs=20; % Stopband attenuation in dB
Wp=2*fc/Fs; % Normalized passband edge frequency
Ws=2*fs/Fs; % Normalized stopband edge frequency
%
% Filter design
&
[N,Wn]=buttord(Wp,Ws,Rp,Rs); % Filter order selection
[b,a]=butter(N,Wn); % Butterworth filter design
[Z,P,K]=tf2zp(b,a); % Transfer function to zero-pole
[sos,G]=zp2sos(Z,P,K); % Zero-pole to 2nd-order section
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -