What does maximum lag signify? (Matlab)

Status
Not open for further replies.

abhigopal

Member level 3
Joined
Dec 21, 2004
Messages
61
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
624
Hi all
I am using the XCORR function in MATLAB to compute cross correlation between two arrays ( vectors).
however, I am getting the following error. Wht do I do.

??? Error using ==> xcorr
Maximum lag must be an integer.

What does Max lag signify? I tried using MATLAB help but was not successfull
thanks
abhi
 

Re: Matlab doubt

Hi abhi,

From matlab help:

XCORR(...,MAXLAG) computes the (auto/cross) correlation over the
range of lags: -MAXLAG to MAXLAG, i.e., 2*MAXLAG+1 lags.
If missing, default is MAXLAG = M-1.

Probably you are getting this message because the second argument is a scalar.
Regards

Z
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…