TVec CrossCorr(TVec Vec1, TVec Vec2, Int32 HiLag, Int32 LoLag)
The cross-correlation of two vectors.
Result: stored in self (calling object), returns self for chaining
Remarks:
Calculate the cross-correlation of two vectors Vec1 and Vec2. The parameter HiLag indicates the top of the range of lags at which the correlation estimates should be computed. The parameter LoLag indicates the bottom of the range of lags at which the correlation estimates should be computed. The results are stored in calling vector. The resulting elements are defined by the equation:
Examples
Vector a;
Vector b;
Vector c;
a.SetIt(false,new double[] {1,-2,3,4});
b.SetIt(false,new double[] {2,-2,3,4});
c.CrossCorr(a,b,2,2);