Main Content

dB Gain

Apply decibel gain

  • dB Gain block

Libraries:
DSP System Toolbox / Math Functions / Math Operations

Description

The dB Gain block multiplies the input by the decibel values specified in the Gain parameter. You can specify the input to be a power signal or a voltage signal.

For more information on how the block applies the decibel gain, see Algorithms.

Ports

Input

expand all

Specify the input signal as a scalar, vector, or a matrix of size M-by-N.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | fixed point
Complex Number Support: Yes

Output

expand all

Output after applying the decibel gain, returned as a scalar, vector, or a matrix of the same size, data type, and complexity as the input signal.

For more information on how the block applies the decibel gain, see Algorithms.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | fixed point
Complex Number Support: Yes

Parameters

expand all

Note

This block does not support tunability in generated code.

Specify the dB gain to apply to the input as a scalar or a real matrix of the same size as the input matrix.

Tunable: Yes

Specify the type of input signal as one of these:

  • Power –– The block treats the signal as the power signal.

  • Amplitude –– The block treats the signal as the voltage signal.

Tunable: Yes

Block Characteristics

Data Types

double | fixed point | integer | single

Direct Feedthrough

no

Multidimensional Signals

no

Variable-Size Signals

no

Zero-Crossing Detection

no

More About

expand all

Algorithms

For an M-by-N input matrix u with elements uij, the Gain parameter can be a real M-by-N matrix with elements gij to be multiplied element-wise with the input, or a real scalar.

yij=uij10(gij/k)

The value of k is 10 for power signals (select Power as the Input signal parameter) and 20 for voltage signals (select Amplitude as the Input signal parameter).

The value of the equivalent linear gain

gijlin=10(gij/k)

is displayed in the block icon below the dB gain value.

Extended Capabilities

Version History

Introduced before R2006a

See Also

Functions

Blocks