Kehl, a fast (no loop) method to compute MSD

Versión 1.1.0.0 (2,01 KB) por maxime
Kehl computes the mean squared displacements (MSD), with no loop. Fully vectorized code.
616 descargas
Actualizado 22 may 2013

Ver licencia

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.

Citar como

maxime (2024). 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. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2010b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Operating on Diagonal Matrices en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.1.0.0

A mispelling in a comment

1.0.0.0