Code covered by the BSD License

# PIVMat 3.02

### Frederic Moisy (view profile)

27 Apr 2006 (Updated )

A PIV Post-processing and data analysis toolbox

corrf (PIVMat Toolbox)
corrf (PIVMat Toolbox)
 PIVMat Function Reference << Prev | Next >>
corrf
Spatial 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 also contains various integral scales computed from the correlation function (see below). 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.5 (linearly interpolated) is5: integral scale, computed as the integral of f from 0 to r5 r2, is2, r1, is1, r0, is0 : idem as r5, is5, for crossovers at 0.2, 0.1 and 0 respectively COR = corrf(F, DIM, 'norm') normalizes the correlation function, so that f = 1 at r = 0. For a vector field V, corrf(vec2scal(V,'ux'),'x') and corrf(vec2scal(V,'uy'),'y') are the longitudinal correlation functions, and corrf(vec2scal(V,'ux'),'y') and corrf(vec2scal(V,'uy'),'x') are the transverse ones. Note that the convergence of the correlation function is not garanteed, especially at large separations r, for which very few data points are available to compute the correlation. If the crossover scales are not defined (i.e. if the correlation function does not decrease enough for large r), NaNs (not a number) are returned, and a warning is issued. Use corrf(...,'nowarning') to ignore these warnings. COR = corrf(..., 'verbose') also displays the computation in progress. 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, tempcorrf, statf, histf, vsf, specf. Published output in the Help browser showdemo corrf ```
 Previous: convert3dto2df Next: docpivmat

2005-2013 PIVMat Toolbox 3.02