Mat lab program to plot the frequency response of low pass filter
clc;
clear all;close all;
rp=1;
rs=40;
w1=800;
w2=1200;
ws=3600;
aw1=2*pi*w1/ws;
aw2=2*pi*w2/ws;
pw1=2*tan(aw1/2);
pw2=2*tan(aw2/2);
[n,wc]=buttord(pw1,pw2,rp,rs,'s');
[b,a]=butter(n,wc,'s');
[num,den]=bilinear(b,a,1);
[mag,freq]=freqz(num,den,128);
freq1=freq*ws/(2*pi);
m=20*log10(abs(mag));
plot(freq1,m);
title('Respose of low pass filter');
grid on;
Comments
Post a Comment