Confused about dB in MATLAB
Show older comments
Hi;
I am fairly new to dB manipulations and I am getting really confused with it.
So if I produce a tone in MATLAB like this:
Fs = 16000;
duration = 60;
level = -2;
freq1 = 500;
t = 0: 1/Fs : duration*(Fs-1)/Fs;
fa1 = 10^(level/20);
y1 = fa1*sin(2*pi*freq1*t)';
sound(y1,Fs);
The dB level the user needs to input is in dB-full scale because the sound is being produced digitally correct?
So if I measure the sound using a dB sound meter, which measures the level in dB-SPL, I should be getting the max dB-SPL at 0 dB-full scale correct?
However, if I go down to -6dB-full scale, the dB-SPL goes down by 10dBSPL.
How can I modify the code such that -6dB-full scale causes the dB-SPL to be reduced by 6dBSPL.
I hope I did not confuse any one lol.
NOTE: my speakers are at MAX level
Thank you very much. Ali
Accepted Answer
More Answers (0)
Categories
Find more on Audio and Video Data 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!