control.db2mag

control.db2mag(db)[source]

Convert a gain in decibels (dB) to a magnitude.

If A is magnitude,

db = 20 * log10(A)

Parameters

db (float or ndarray) – input value or array of values, given in decibels

Returns

mag – corresponding magnitudes

Return type

float or ndarray

Examples

>>> ct.db2mag(-40.0)                                        
0.01
>>> ct.db2mag(np.array([0, -20]))                           
array([1. , 0.1])