?? prog7b6.m
字號:
%
% Program name - prog7b6.m, p453
% m-file for calculating the coefficients of an FIR filter
% with arbitrary magnitude response
%
Fs=2000;
N=110;
fd=[0 0.15 0.25 0.45 0.5 0.75 0.85 1]; % Frequency sampling points
Hd=[1 1 0.3 0.3 0.1 0.1 0 0]; % Frequency samples
hn=fir2(N-1, fd, Hd); % Compute the impulse response
[H, f] = freqz(hn, 1, 512, Fs); % Plot the magnitude response
plot(f, abs(H)), grid on
xlabel('Frequency (Hz)')
ylabel('Magnitude ')
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -