Problem with cross correlation - xcorr
- From: Steven White <s.m.white@xxxxxxxxxxx>
- Date: Wed, 07 Mar 2007 20:19:54 EST
Hi All!
I am having a problem with the output from xcorr, as it doesn't give me what I am expecting.
I have two time series, which have been generated by a mathematical population model, where each series corresponds to the density of each population over time. These time series are oscillating and are completely out of phase, i.e. when one peaks the other is at a trough
and vice verse.
I analyse these time series in the following way:
where M is a matrix that contains the two time series and 25 is the max time lag.[r, lags]=xcorr(M(:,1),M(:,2),25);
plot(lags,r)
From the plot that I get the most dominant lag is a zero, which is clearly wrong! It should be about 15. Also there is a sharp discontinuity at zero (shouldn't this be smooth?).
Can anybody help?
Thanks,
Steven.
.
- Follow-Ups:
- Re: Problem with cross correlation - xcorr
- From: Steven White
- Re: Problem with cross correlation - xcorr
- From: Rune Allnor
- Re: Problem with cross correlation - xcorr
- Prev by Date: Calculating an equation multiple times
- Next by Date: Re: Find neighbor points for given voronoi polygon
- Previous by thread: Calculating an equation multiple times
- Next by thread: Re: Problem with cross correlation - xcorr
- Index(es):
Relevant Pages
|
Loading