Kindly explain me abt this command
Show older comments
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
More Answers (2)
Wayne King
on 29 Oct 2011
0 votes
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
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.
Categories
Find more on Frequency Transformations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!