PIVMat Function Reference<< Prev | Next >> 
corrf
Correlation function of a scalar field

Description
COR = corrf(F, DIM) returns the correlation function of the scalar 
field F along the dimension DIM (with DIM=1, 2, or 'x','y', for 
correlation along the 'X' or 'Y' direction). If F is an array of 
scalar fields, COR returns the average of the correlation functions of 
each field. 
 
COR is a structure which contains the following fields: 
  r:       separation length 
  f:       correlation function 
  unitr:   unit of separation length 
  unitf:   unit of correlation function 
  namef:   name of correlation function 
  isinf:   integral scale, computed as the integral of f up to infty 
  r5:      scale at which f(r5)=0 (linearly interpolated) 
  is5:     integral scale, computed as the integral of f up to r5 
  r2, is2, r1, is1:  idem as r5, is5, for crossovers at 0.2 and 0.1 
 
COR = corrf(F, DIM, 'norm') normalizes the correlation function. 
 
Note that corrf(vec2scal(V,'ux'),'x') and corrf(vec2scal(V,'uy'),'y') 
are the longitudinal velocity correlation functions, and 
corrf(vec2scal(V,'ux'),'y') and corrf(vec2scal(V,'uy'),'x') are the 
transverse ones. 
 
If no output argument, the correlation function is plotted. 
 
Example
 
   v = loadvec('B00001.VEC'); 
   cor = corrf(vec2scal(v,'vx'),'x'); 
   plot(cor.r, cor.f, 'o-'); 
 
See Also
vec2scal, statf, histf, vsf. 

 Previous: checkupdate_pivmatNext: docpivmat 

2005-2007 PIVMat Toolbox 1.60