CalcRMS | R Documentation |
RMS
This function calculates the running RMS
value of multi-channel signal as
\code{RMS}\{F(A)\}=w^{-1}≤ft(∑_{i=τ_{1}}^{τ_1 +w}\cdots∑_{i=τ_{l}}^{τ_l+w}A_{ij}^{2}\right)^{1/2}\quad (j=1,…,m),
where F is a function that divides the signal in l-equispaced time frames of length w and A=(A_{i1},…,A_{im})^\top is a m dimensional vector representing the multi-channel signal. As a result, we obtain a l \times m vector with the RMS
values for each time frame and channel. The RMS
value is generated every inFrameInterval
seconds over a period τ of inFrameWidth
seconds.
CalcRMS(inSignal, inSampleFreq, inFrameWidth, inFrameInterval)
inSignal |
the input signal. If this is a matrix, |
inSampleFreq |
the sample frequency of the input signal (in Hz). |
inFrameWidth |
the period over which the |
inFrameInterval |
the period between two successive frames (in s). |
An object of class "AI
" that contains the running RMS
value (RMSSignal
) of the given signal and its sample frequency (RMSFreq
).
Marc Vidal (R
version). Based on the original code from IPEM Toolbox.
data(SchumannKurioseGeschichte) s <- SchumannKurioseGeschichte ANIs <- CalcANI(s, 22050) RMS <- CalcRMS(ANIs$AuditoryNerveImage, ANIs$ANIFreq, 0.029, 0.0058)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.