PIVMat Function Reference<< Prev | Next >> 
spatiotempcorrf
Spatio-temporal correlation function

Description
STC = SPATIOTEMPCORRRF(F) computes the spatio-temporal correlation 
function of the scalar fields F, defined as 
    C(X,T) = < w(x,y,t) w(x+X,y,t+T) > / < w(x,y,t)^2 >, 
with <..> the average over x, y, and t.  The normalization is such that 
C(0,0)=1. This is useful to determine the convection velocity of a 
pattern (e.g. a wave), which is given by the slope X/T maximizing the 
correlation C. 
 
The spatial correlation is computed along the X direction only (rotate 
your field if you want a correlation along Y). Since C(-X,-T) = C(X,T) 
(for an homogeneous and stationnary process), only two out of four 
quadrants are computed: (X,T) = (>0, >0) and (<0, >0). 
 
The output structure STC contains: 
   STC.cor    Matrix containing the correlation C(X,T) 
   STC.X      Vector (of size 1+round(Nx/2)) containing the separations 
   STC.T      Vector (of size 1+round(Nt/2)) containing the time lags 
where Nt = LENGTH(F) and (Nx, Ny) is the size of the fields. 
 
STC = STCORRF(...,'full') computes the correlation for all possible X 
and T (remark: large X and T are noisy because of poor average). 
 
STC = STCORRF(...,'verbose') displays the work in progress. 
 
Example
 
   stc = stcorrf(h,'verb'); 
   contourf(stc.X, stc.T/200, stc.cor',16); 
   xlabel('X (mm)'); ylabel('T (s)'); 
 
See Also
corrf, tempcorrf, tempspecf, specf, EXTRACTMODE. 
 
Published output in the Help browser 
   showdemo spatiotempcorrf 

 Previous: smoothfNext: spaverf 

2005-2016 PIVMat Toolbox 4.01