View source: R/buildHilbertSpectrum.R
| buildHilbertSpectrum | R Documentation |
Accumulates the instantaneous amplitude, or its square, of every mode in the frequency cell of its instantaneous frequency, sample by sample, and integrates the result over time.
buildHilbertSpectrum(frequency, amplitude, edges, exponent, samplingInterval)
frequency |
Numeric matrix, samples by modes, of instantaneous
frequencies in Hz, finite or |
amplitude |
Finite non-negative matrix with the dimensions of
|
edges |
At least two finite, strictly increasing cell edges in Hz;
cell |
exponent |
The power |
samplingInterval |
Sampling interval |
The spectrum holds the mass of each cell,
H[n, b] = \sum_{k:\, f_k[n] \in [e_b, e_{b+1})} a_k[n]^p,
in units of the signal to the power p. A frequency outside the edges
or NA adds nothing. The marginal spectrum of a cell is the time
integral \Delta t \sum_n H[n, b]. No scaling or division by the cell
width is applied: the values are masses, not densities. The inputs are
usually the frequency and amplitude of
computeInstantaneousAttributes.
A list with
spectrum |
Double matrix, samples by cells, in units of the signal to
the power |
marginal |
Numeric vector by cell, in units of the signal to the power
|
computeInstantaneousAttributes, decomposeEMD
Time <- seq(0, 9, length.out = 3000)
Signal <- sin(pi * Time) + sin(2 * pi * Time) + sin(6 * pi * Time) +
0.5 * Time
Modes <- decomposeEMD(Signal,
sifting = list(stopRule = "doubleThreshold"))$modes
Attributes <- computeInstantaneousAttributes(Modes,
samplingInterval = 9 / 2999)
OUT <- buildHilbertSpectrum(Attributes$frequency, Attributes$amplitude,
edges = c(1, 2, 3, 4, 5), exponent = 2,
samplingInterval = 9 / 2999)
dim(OUT$spectrum)
OUT$marginal
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.