Kindly explain me abt this command

2 views (last 30 days)
moonman
moonman on 29 Oct 2011
Can anybody explain me this command
ss = (mean(conv(tones(:,1),hh).^2) > mean(tones(:,1).^2)/5);
This command the book is using for DTMF decoding Plz explain me this

Accepted Answer

moonman
moonman on 29 Oct 2011
Yes you are exactly right. This portion is related to detection for presence of specific tone. Thanks for u reply I just want to ask now why book has scaled it by factor of 1/5
If i make it 1/20 or by 1/2 what will be the impact.
I have one more query. In equation
h[n] = (2/L) cos ( 2 π fb n / fs ), 0≤ n < L
where L is filter length, fb center frequency of the filter (frequency to be filtered), n is number of filter points, and fs is sampling frequency on which filter is implemented.
What we mean by Filter Points. Can u kindly explain
  2 Comments
moonman
moonman on 29 Oct 2011
What is the difference between L and n
moonman
moonman on 29 Oct 2011
Is the length of Filter and Number of Tabs in same thing

Sign in to comment.

More Answers (2)

Wayne King
Wayne King on 29 Oct 2011
Hi, This is comparing the mean value of the squared values of a convolution with the mean of the squared values of the waveform scaled by 1/5.
I'm assuming this is part of the detection algorithm to decide which tone is present.
Filtering the waveform (convolving) with a frequency-selective filter should remove a lot of the frequency content. If most of the signal's energy is in the passband of the filter, you will still be left with a sizable proportion of the total energy, if not, then you will not.
ss is a 1 or 0 which tests that hypothesis. It's 1 if most of the energy is in the passband of the filter, and 0 if it is not.

Wayne King
Wayne King on 29 Oct 2011
I'm not sure exactly why they picked 5 here. Perhaps it's an empirical finding?
If you increased it to say 20, then that will reduce the value of
mean(tones(:,1).^2)/N);
where N is the specific value, that would mean that ss would be 1 in more cases. In other words, that would result in many more decisions that the tone was present and perhaps too many false positives.
On the other hand, making it 1/2 would have the opposite effect.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!