Kindly explain me abt this command
显示 更早的评论
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
采纳的回答
更多回答(2 个)
Wayne King
2011-10-29
0 个投票
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
2011-10-29
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Frequency Transformations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!