PIVMat Function Reference | << Prev | Next >> |

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 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.
[W, E] = **tempspecf**(...) returns the result without display, where
W = 2*pi*F is the radian frequency (rad/s) 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).

**Example**
**tempspecf** (v, 2, 'hann', 'peak');
Parseval theorem (energy conservation) verification, for 2-components
fields:
[w,e] = **tempspecf**(v,1);
energy_spectral = sum(e)*w(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.

**See Also**
tempfilterf, tempcorrf, spatiotempcorrf, specf
Published output in the Help browser
showdemo **tempspecf**

Previous: tempfilterf | Next: timederivativef |

2005-2017 PIVMat Toolbox 4.10