Kindly explain me abt this command
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (2)
Wayne King
el 29 de Oct. de 2011
0 votos
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
el 29 de Oct. de 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.
Categorías
Más información sobre Frequency Transformations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!