How to generate a noisy sound?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to generate a sound within the band of [33k Hz 35k Hz] for 8 second. The sound is used for hearing test, so I need a sound with mixed frequency within the range. How can I do that?
Thanks
0 commentaires
Réponse acceptée
Star Strider
le 19 Août 2015
The upper limit of human hearing is about 20 kHz, so they won’t be able to hear the signal.
This will generate it:
Fs = 44100; % Sampling Frequency
NrFreqs = 5; % Number Of Frequencies To Use
LoFreq = 33E+3; % Low Frequency Limit
HiFreq = 35E+3; % High Frequency Limit
t = linspace(0, 8, Fs*8); % Time Vector
fv = linspace(LoFreq, HiFreq, NrFreqs); % Freqency Vector
tm = bsxfun(@times, t, fv'*2*pi); % Create Time Matrix
sm = sum(sin(tm)); % Create Signal Vector
sound(sm*100, Fs) % Listen To Result
4 commentaires
Star Strider
le 21 Août 2015
My pleasure.
I’m curious as to the driver circuitry and transducer you’re going to use for that. (My rat never listens to me!)
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Simulation, Tuning, and Visualization dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!