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 signalswith cutoff frequencyfcutand sampling frequencyfsin Hertz.Design a band-pass filter
[sband]=bandpassfilter(s,fcutlow,fcuthigh,fs)which filters input signalswith cutoff frequenciesfcutlowandfcuthighand sampling frequencyfsin 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.
sis the input signal andxis the filtered signal.fsis the sampling rate in Hz.