I have calculated the cross-correlation function between to waveforms. I would like to find the shift between the two waveforms from the peak of the cross-correlation function. I am not really sure how to do that precisely. In this example, I have shifted signal 2 by 1000 Angstroms with respect to signal 1. I want to recover this shift from the CCF.


Asked
Active
Viewed 836 times
3
Royi
- 33,983
- 4
- 72
- 179
Anks_Eagle
- 31
- 2
-
You seem to have the wrong units in the cross correlation horizontal axis. It should be the same units as with the signals. – Olli Niemitalo Jul 25 '18 at 11:07
-
Could you please mark my answer? Or address what is missing? Thank You. – Royi Nov 12 '21 at 07:18
1 Answers
3
Well, All in there is a simple play with the indices of the Auto Correlation Function.
Have a look at my solution for Finding Reference Audio Signal in Test Audio Signal and Cropping Accordingly.
You'll find there full MATLAB Code for the task you mention.
Enjoy...
Royi
- 33,983
- 4
- 72
- 179