Robochameleon
v1.0
Main Page
User Guides
Code groups
Classes
Files
File List
File Members
utils
lin2dB.m
Go to the documentation of this file.
1
2
function
dB =
lin2dB
(lin,varargin)
3
4
[type] = defaultargs({
'db'
},varargin);
5
6
switch
lower(type)
7
case 'db'
8
fact = 0;
9
case 'dbm'
10
fact = -30;
11
case 'dbu'
12
fact = -60;
13
otherwise
14
error('Conversion type can be ''dB'', ''dBm'', ''dBu''.')
15
end
16
17
dB = 10*log10(lin)-fact;
lin2dB
function lin2dB(in lin, in varargin)
Convert linear units to dB.
Generated on Fri Dec 9 2016 18:23:38 for Robochameleon by
1.8.11