Time lag between 2 series: comparing xcorr max with corrcoef with different lags
Mostrar comentarios más antiguos
I am trying to verify the output from xcorr wrt the lag with the highest correlation with the output from corrcoef with different lags which I adjust manually.
Xcorr gives a lag of 0 for the data below, however computing correlation coefficients with corrcoef for 0 lag vs one lag I get a higher correlation coefficient with one lag.
D=[16.654 16.056 15.424 13.91 12.974 12.765 10.846 10.42 10.009 10.827 10.666 8.946 7.775 6.612 ]
E=[64.714 61.045 55.842 51.799 50.836 53.916 52.721416 50.145 51.987 50.123 40.105 33.848 28.467 27.504 ]
I wonder if I am missing something and if yes any help or hint to find out what, would be great. Thanks,
Gad
2 comentarios
David Goodmanson
el 16 de Dic. de 2017
Hi Gad,
For corrcoef, how are you working out the lags for D and E? I got the expected results when I tried this.
Gad Outmezguine
el 16 de Dic. de 2017
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Correlation and Convolution en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!