Program
code
%Chebyshev high pass filter
clc;
clear all;
close all;
fp=input('Please enter
the pass band frequency: ');
fs=input('Please enter
the stop band frequency: ');
rp=input('Please enter
the pass band attenuation: ');
rs=input('Please enter
the stop band attenuation: ');
sf=input('Please enter
the sampling frequency: ');
wp=2*fp/sf;
ws=2*fs/sf;
[n,wn]=cheb1ord(wp,ws,rp,rs);
[b,a]=cheby1(n,rp,wn,'high');
freqz(b,a);
title('Chebyshev
high pass filter');
Example
of output
Please enter the
pass band frequency: 2000
Please enter the
stop band frequency: 1600
Please enter the
pass band attenuation: 0.3
Please enter the
stop band attenuation: 40
Please enter the
sampling frequency: 8000
__________________________