You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
MSD is a measure of the displacement over a certain interval of time, used for instance to analyze trajectories and tell if it's ballistic, diffusive, sub-diffusive, etc.
To compute MSD, all the possible time intervals within the trajectory need to be considerer. The simplest way uses nested loops :
the first loop runs over the time points, the other loop runs over the possible interval from each time point.
Thoses nested loops are a nightmare for fast computation, especially for long trajectories.
Kehl suppresses the loops, and computes all the squared distance at once, then sorts and averages them out.
Cite As
maxime (2026). Kehl, a fast (no loop) method to compute MSD (https://www.mathworks.com/matlabcentral/fileexchange/41858-kehl-a-fast-no-loop-method-to-compute-msd), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.1.0.0 (2.01 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
