program_05_2.m

来自「自编的一些小波源程序,用MATLAB编的.希望对那些喜欢小波的人有所帮助.去解压」· M 代码 · 共 15 行

M
15
字号
% Program 5_2
% Program to Design Butterworth Lowpass Filter
%
% Type in the filter order and passband edge frequency
colordef black;
N = input('Type in filter order = ');
Wn = input('3-dB cutoff frequency = ');
% Determine the transfer function
[num,den] = butter(N,Wn,'s');
%  Compute and plot the frequency response
omega = [0: 200: 12000*pi];
h = freqs(num,den,omega);
plot (omega/(2*pi),20*log10(abs(h)),'g');
xlabel('Frequency, Hz'); ylabel('Gain, dB');
grid on;

⌨️ 快捷键说明

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