How can find decibal sampl for audio

Iam read audio file and ineed to comput loudness sample in audio

 Accepted Answer

See if the Signal Processing Toolbox mag2db function will do what you want.
Note that it is necessary to use the absolute value of the argument:
xdB = mag2db(abs(x));
.

8 Comments

Thanks another question must convert audio to frequency domaine or not
That is up to you. Use the fft function, if you want to do that.
My Answer with respect to mag2dB remains the same with respect to the fft results.
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

I used the following equation Y=waveread(‘audio.wav’) Db=10log10(y^2/2e-5.^2)

and the result is different from this equation Db=Mag2db(y) Why please help me

I suspect that the reason is the you are calculating one of them as y.^2/2e-5.^2 instead of simply y.^2.
I want to get samples that contain decibels higher than 80 from this equation. Mag2db) Values are very low and negative Is there an add-on to get noisy samples over 80 db?
CConsider that:
dB80 = db2mag(80)
produces:
dB80 =
10.0000e+003
so multiplying them by 1E+4 or dibviding them by 1E-4 would do what you want.

Sign in to comment.

More Answers (0)

Categories

Find more on Audio Processing Algorithm Design 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!