Program code
clc;clear all;
close all;
fp=input('Please enter the first pass band frequency: ');
fs=input('Please enter the first 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]=buttord(wp,ws,rp,rs);
[b,a]=butter(n,wn,'low');
freqz(b,a);
title('Butterworth Low Pass Filter');
Example of output
Please enter the first pass band frequency: 2000
Please enter the first stop band frequency: 1600
Please enter the pass band attenuation: .5
Please enter the stop band attenuation: 53
Please enter the sampling frequency: 9500
__________________________________
A signal ๐ฅ(๐ก) = 200 cos(48๐ × 103 ) ๐ก is ideally sampled with a sampling period of 100 ยตsec and then passed through an ideal low pass filter with cutoff frequency of 30 KHz. Find the frequency is/are present at the filter output? Demonstrate the same using mat lab & simulink. Can you please tell me how to get started?
ReplyDelete