AdaptLevel | R Documentation |
RMS
Power LevelThis function adapts the root mean square (RMS
) power level of the signal to the specified dB level (indB
). For a sampled signal s_i\ (i=1,…,n), the RMS
is defined as
\code{RMS}\{s_i\}=√{\frac{1}{n}∑_{i=1}^n s_i^{2}.}
The factor to adapt the signal is calculated as \code{factor}=10\times\log_{10}(\code{indB}/\code{RMS}).
AdaptLevel(inSignal, indB)
inSignal |
a numeric vector representing the input signal. |
indB |
a scalar indicating the wanted level (0 is maximum level without clipping, -20 is reasonable). |
The reference value of 0 dB is the level of a square wave with amplitude 1. Thus, a sine wave with amplitude 1 yields -3.01 dB.
A numeric vector representing the adapted input signal.
The multi-channel version of AdaptLevel
is deprecated and only is available in IPEM Toolbox.
Marc Vidal (R
version). Based on the original code from IPEM Toolbox.
ALs <- AdaptLevel(SchumannKurioseGeschichte, -20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.