Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert decibel values into positive values? [closed]

I'm getting the decibel values in negative. I just want to plot these values on a graph ranging from 0 to 100. So is there any way to convert the decibel values into positive values?

like image 461
Mithun Avatar asked Nov 29 '25 23:11

Mithun


2 Answers

It's quite common for 0 dB to correspond to full scale input (remember that a plain dB scale actually defines a ratio, not an absolute value, so the meaning of 0 dB is somewhat arbitrary). For e.g. 16 bit audio, values might typically range from 0 dB to -96 dB. To represent this on a scale of 0 - 100 you could just add 96 dB to bring this range up to 0..+96 dB.

like image 91
Paul R Avatar answered Dec 02 '25 14:12

Paul R


This is not a solution specific to decibels, but if you want your scale to be from 0-100, take your minimum value (lets call it minVal), and add -minVal to get 0. Then divide it by your maximum value, and multiply by 100.

like image 23
Katfish Avatar answered Dec 02 '25 12:12

Katfish



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!