Scilab Function
Last update : 31/3/2006

CORRCROIS - Extension of the corr function

Calling Sequence

C = CORRCROIS(u,v,DecalNegMax,DecalPosMax)

Parameters

Description

The function permit to locate the lag that optimises the cross correlation between two series.

This function is different from corr because it allows negative lags.

Examples

   x=(0:0.1:10)';e=rand(size(x,1),1);
   y1=sin(x)+e;
   y2=sin(x+%pi/4)+e;
   R=CORRCROIS(y1,y2,20,20);
   subplot(2,1,1),plot2d([y1 y2])
   subplot(2,1,2),plot2d(R(:,1),R(:,2))   
  

See Also

corr ,  

Authors

Julien Lerat CEMAGREF Antony, HBAN Unit, julien.lerat@cemagref.fr