You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Assume you have a pulse (reference, or transmitted signal) and a delayed version of it (measured signal in sonar, radar, range meter application). You need to estimate the delay between the measured and reference signals. All you need to supply just two signals. This function calculates the cross-correlation between two signals and estimates the location of the peak. Peak is estimated with higher than sampling period resolution. Subsample estimation is done using cosine interpolation. Refer paper below for this function accuracy analysis:
L.Svilainis, et al. Subsample interpolation bias error in time of flight estimation by direct correlation in digital domain. Measurement. 2013, vol. 46, iss. 10, p. 3950-3958.
Two signals can be any shape, not necessary just pulse (e.g. chirp, PSK sequence). Can also be used for spatial shift estimation if signals in time are replaced by signals in space.
Once downloaded, type help GetTOFcos for more info.
Cite As
Linas Svilainis (2026). GetTOFcos(MySignal,RefSignal) (https://se.mathworks.com/matlabcentral/fileexchange/65229-gettofcos-mysignal-refsignal), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0.2 (2.74 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
