Qu

pow2db

Builtin index · Signal processing

result = pow2db(x)

Input: x · Output: result

What it is

x: a number or vector (power ratio).

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
result = pow2db(x)
x number or vectornot documented yet
result —
Returns the same shape: 10*log10(x). POWER-domain convention.

Examples

From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.

  print("{mag2db(2)} dB")   # 6.0206 -- a factor-of-2 voltage ratio

  print("{pow2db(2)} dB")   # 3.0103 -- a factor-of-2 power ratio

output
6.0206 dB
3.0103 dB

from numerics-dsp