Calculate Asynchrony/Distance of Mutual Closest Matches

version 1.1 (3.02 KB) by Alexis
Calculate euclidean distance between two serial pairwise matched vectors, also returns indices of paired/unpaired datapoints


Updated 12 Oct 2020

View License

Finds the mutual closest matches in any two vectors. This function accepts two vectors (e.g., time stamps, drum hits, word onsets) and looks for the mutual closest matches between successive observations, dropping unpaired points (e.g., extra or omitted events). No point can be paired more than once.

The resultant absolute distances (e.g., milliseconds) between each pair of points are returned as a new vector. You can also optionally plot the two input vectors along with their proposed pairings by flagging third optional argument as '1'.

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!