For an analog communication system design in MATLAB firstly I need to do these two design:
Design a low-pass filter
[slow]=lowpassfilter(s,fcut,fs)
which filters input signals
with cutoff frequencyfcut
and sampling frequencyfs
in Hertz.Design a band-pass filter
[sband]=bandpassfilter(s,fcutlow,fcuthigh,fs)
which filters input signals
with cutoff frequenciesfcutlow
andfcuthigh
and sampling frequencyfs
in Hertz.
Could you please help me?
I found this question which has so many views and still no good answer.
The following code will do what you need. Since no filter-type is specified, I used a butterworth-filter to demonstrate it.
s
is the input signal andx
is the filtered signal.fs
is the sampling rate in Hz.