control.matlab.db2mag

control.matlab.db2mag(db)[source]

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

If A is magnitude,

db = 20 * log10(A)

Parameters:
dbfloat or ndarray

Input value or array of values, given in decibels.

Returns:
magfloat or ndarray

Corresponding magnitudes.

Examples

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