Complementing the Parks-McClellan
Algorithm - Example
The Matlab commands below produce the filter illustrated in the
figure. The Matlab programs can be down loaded from the previous
page.
Go back to previous page.

n = 21; % impulse response length
wo = 0.4*pi; % cut-off frequency
dp = 0.05; % passband ripple size
ds = 0.05; % stopband ripple size
[h,rs,be] = fir_lp(n,wo,[dp,ds]);

n = 55; % impulse response length
wa = 0.204*pi; % first cut-off frequency
wb = 0.540*pi; % second cut-off frequency
d1 = 0.01; % first stopband ripple size
d2 = 0.01; % passband ripple size
d3 = 0.01; % second stopband ripple size
[h,rs,be] = fir_bp(n,wa,wb,[d1,d2,d3]);