Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

low pass filter (matlab)

Not open for further replies.


Newbie level 3
Dec 8, 2005
Reaction score
Trophy points
Activity points
fir1 matlab

hi all ,
i am supposed to implement an Am modulator and demodulator using Matlab

i have finished the modulator already

but i have a problems in the demodulator
i make an envelope detector ( i make it manually )

but then i want to make low pass filter and i don't know how

i know fir1() and filter() but i don't know how to use them
so anybody can help ???

thanks alot

matlab fir1

the best way is to read Matlab help. see the matlab entries for commands:
"butter" that u can set it as a LPF .
a glance will guide u through.

low pass filter matlab


[num,den] = butter(2, .8 ) ;
FilteredOutput = filter(num,den,DeAmpMod);

where DeAmpMod is the Demodulated AM modulated signal you want to filter.

Good luck!

matlab lpf

thanks very much for your replies
butter(2, .8 )
can you tell me what is the 2 and what is the .8

, another thing , i prefere to work with fir1
as my professor told me to use

so if you can explain to me its parameters
fir1(n,Wn) it will help alot

if no , then butter will do the job

thanks very much you are really saving me :D

lowpass filter matlab

The command fir1 in matlab implements digital filters based on the window methods , as you indicated the comand h=fir1(n,wn) returns the nth +1 coeficients of a Hamming window lowpass linear filter, the vector h is the coeficients of the filter from wich you will convolve the sample demodulated signal. If you want to use other window than hamming, for instance if you need a attenuation in the stopband higher than 44 db you can use h = fir1(n,Wn,window) where widow should be a colum vector resulted from a desired window see blackman and kaiser in the matlab help.

Dont forget that Wn is the normalised frequency i.e the desired cut off frequency over Sampling frequency.

n is the number of coeficient of the filter, it depends of the transition width ( normalized) and the window used, for a hamming window n=3.3/( transition width). Remember to normalize the transition width related to the sampling frequency and that transition width = stopband - passband

After find h from fir1 you can peform as the pall b.pricope suggested :

FilteredOutput = filter(h,1,DeAmpMod);

where DeAmpMod is the Demodulated AM modulated signal you want to filter.

I hope have helped

fir1 filter


that really helped me alot , i finished the AM , i hope FM became more Simpler

digital low pass filter matlab

who can recommend book related lpf by matlab ? thanks

lpf matlab

Digital Signal Processing using MATLAB by Proakis is one of the very good books.
You can find it here on the server.

matlab low pass filter butter

here is your req feel free to contact me
cut_of_freq =0.2; %normalised frequency f/fs

N = 11 %order of the filter
h = fir1 (N-1, cut_of_freq, hamming(N));
Y =filter(h,x); % here x is our in put signal
for more about the fir1 go to command window and type help fir1 u can get good information how to use it

how to create a low pass filter using matlab

for xuedashun:
Computer Explorations in SIGNALS AND SYSTEMS (Using Matlab)
BY : John R.Buck (co-author of oppenheim in his DSP book)

and it has a lot of other usages of matlab.

Not open for further replies.

Part and Inventory Search

Welcome to