# Fir filter designing in matlab

Discussion in 'Homework Help' started by saad zulfiqar03, Dec 19, 2013.

1. ### saad zulfiqar03 Thread Starter New Member

Dec 19, 2013
1
0
Hello everyone!

I am studying digital signal processing course and i want to make Fir low pass filter in matlab by using my owns filter's coefficients(not built in matlab commands).

I have determined the filter order from N=4/Normalizes of the transition width, which is 144.

where Fs(sampling frequency) is 7200Hz, fp (pass-band edge frequency) is 500Hz and fs(stop-band edge frequency) is 700Hz.

Now, i am stuck in (1)to create an ideal impulse response and then (2) apply Blackman window function on it to calculate my filter's coefficients.

i am facing problems in matlab commands to implement (1) and (2).

Can anyone help me?

2. ### blah2222 Well-Known Member

May 3, 2010
552
33
In order to create an ideal low-pass filter in the frequency domain, you need to create its DFT pair in the time domain.

Wsinc(W*n) <---> rect(f/W); where W is the width of the rectangular pulse in the frequency domain of width W centred at DC (0 Hz).

The sinc function is non-causal (has values at n < 0) so you will need to delay it, but since MATLAB stores its values in an indexed array you can just simply multiply it by the blackman window function of the same length.