Temporal power spectrum of vector / scalar fields
tempspecf(V, FS) plots the temporal power spectrum, spatially averaged,
of the time series of vector or scalar fields V. FS is the sampling
frequency, in Hz (1 Hz by default). The maximum frenquency is half the
sampling frequency (Nyquist theorem).
Points containing zero or a NaN values in their time series are not
taken into account (use the option 'zero' to include them)
tempspecf(V, FS, 'Property1', 'Property2', ...) specifies the properties:
- 'hann': uses a Hann apodization.
- 'peak': also shows the frequency and index of the highest peaks.
- 'doublex' or 'doubley': for 2-component velocity fields, counts
twice the energy spectrum for the x (or y) velocity component
(useful in case of statistical axisymmetry).
- 'zero': include the points containing zero or NaN values.
[F, E] = tempspecf(...) returns the result without display, where F is
the frequency (in Hz) and E the energy density.
Method: each point (i,j) of the fields give a time series. The temporal
spectra of each of those time series are computed, and averaged over
all points (i,j). By default, if the time series of a point (i,j)
contains at least one zero or NaN value, the corresponding spectrum is
not computed (unless the option 'zero' is specified).
tempspecf (v, 2, 'hann', 'peak');
Parseval theorem (energy conservation) verification, for 2-components
[f,e] = tempspecf(v,1);
energy_spectral = sum(e)*f(2);
[sx, sy] = statf(v);
energy_physical = sx.rms^2 + sy.rms^2;
Note: for fields containing zero and/or NaN values, the Parseval theorem
is not satisfied.
Published output in the Help browser