Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Matlab matched filter question

  1. Apr 1, 2010 #1
    1. The problem statement, all variables and given/known data
    matchedfil.jpg

    Our job is to recreate the system in the above diagram in Matlab. I've been able to do all the stages effectively except the "matched filtering" part.

    2. Relevant equations



    3. The attempt at a solution

    I don't really understand matched filtering very well. I dont know if I have a stream of 1000 bits of data, if each bit goes once at a time through the matched filter, or all 1000 bits get filtered at once. Here's what I tried to do:

    "Sig" is the variable which contains 1000 bits of binary data mixed with white noise, with a signal to noise ratio of 1dB. "s" is the variable which contained the binary data before noise was added.

    Below is my attempt at a matched filter, to try to maximize the signal to noise ratio.

    Code (Text):
    %matched filtering loop 1
    for count = 1:1000
        if s(count) == 1
            H = 1;
        else
            H = 0;
        end
    Sig(count) = filter(Sig(count),1,H);
    end

    Am I doing it completely wrong?

    Thanks!!
    -Andrew
     
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted