MATLAB Answers


Matched filter

Asked by vsee
on 1 Apr 2011
Latest activity Commented on by Honglei Chen
on 12 Jan 2017

How can I write a mtached filter in Matlab? I have the filter design and signal processing tool boxes.


Log in to comment.

4 Answers

Answer by Honglei Chen
on 1 Apr 2011

If you have a signal, x, then the matched filter's coefficients is given by time reverse of x, i.e., x(end:-1:1). If your signal is complex, you also need to to use complex conjugate. You can then use it just as an FIR filter. For example,

>> x = ones(10,1);
>> b = x(end:-1:1);
>> y = filter(b,1,x);


Hii i was wondering what is the impulse response of matched filter here?I think it is related to b. Do you think if i want to select a specific sample number for b, i also need to change the length of input signal x?

How to apply matched filter if the signal is complex?

It's the same, use the filter function. The only difference is when you come up with the filtering coefficient, you need to add a conjugate, like

b = conj(x(end:-1:1))


Log in to comment.

Answer by Andrew Newell
on 1 Apr 2011

Check out MATLAB Simulations for Radar Systems Design from the File Exchange.


Log in to comment.

Answer by Bhaskar
on 15 Apr 2011

To elaborate on Honglei's answer. If the signal you are trying to design a matched filter for, is x, then --

>> b = x(end-1:1);
>> y = filter(b,1,x);

You should already have x.

  1 Comment

mmm ssss on 9 Jan 2012

how can implement the same filter on image ?

how i should represent x.

Log in to comment.

Hi You can try the model given here

Square Root raised Cosine - Matched filter implementation

Regards Mathuranathan


Log in to comment.

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!