butt.m

来自「Design for Butterworth Filter」· M 代码 · 共 17 行

M
17
字号
%Butterworth Filter
clc;
wp=input('Enter the pass band frequency ');
ws=input('Enter the stop band frequency ');
p=input('Enter the pass band attenuation ');
s=input('Enter the stop band attenuation ');
rp=20.*log(1/p);
rs=20.*log(1/s);
[n,wn]=buttord(wp,ws,rp,rs);
disp('Order of filter ');
disp(n);
disp('Cut-off frequency ');
disp(wp);
[b,a]=butter(n,wn);
title('Butter');
freqz(b,a);

⌨️ 快捷键说明

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