Mercurial > hg > ishara
view general/numerical/scalar/todbs.m @ 16:db7f4afd27c5
Rearranging numerical toolbox.
author | samer |
---|---|
date | Thu, 17 Jan 2013 13:20:44 +0000 |
parents | general/numerical/todbs.m@e44f49929e56 |
children |
line wrap: on
line source
function Y=h_todbs(X,dBs) % todbs - Convert values to decibels % % todbs :: % real ~'dimensionless value', % real ~'dynamic range in dB' % -> real ~'value in dBs'. if nargin>1, mmax=max(X(:)); X=max(X,10^(-dBs/10)*mmax); end Y=10*log10(X);