examp45.m
来自「ADSP TOOLBOX: Version 2.0 and gui m-file」· M 代码 · 共 14 行
M
14 行
clc,echo on
%EXAMPLE 45
A1=[1 45];fp1 = 20; fs1=40; % Filter 1 is Butterworth LP
A2=[1 50];fp2=[150 200];fs2=[100 300]; % Filter 2 is Chebyshev BP
[n1, d1]=afd('bw','lp',A1,fp1,fs1); % Design LPF
[n2, d2]=afd('c1','bp',A2,fp2,fs2); % Design BPF
G=10^(12/20); n2=G*n2; % Multiply n2 by gain (12 dB=3.9811)
np=conv(n1,d2)+conv(n2,d1); % Numerator of parallel combination
dp=conv(d1,d2); % Denominator of parallel combination
tfplot('s',np,dp,[0 400],0,1);pause(2) % Plot magnitude (0-400 Hz)
tfplot('s',np,dp,[1 400],1,1) % Plot dB magnitude (1-400 Hz)
echo off %end of example
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?