Code covered by the BSD License  

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

Be the first to rate this file! 8 Downloads (last 30 days) File Size: 2.01 KB File ID: #41858

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

by

 

21 May 2013 (Updated )

Kehl computes the mean squared displacements (MSD), with no loop. Fully vectorized code.

| Watch this File

File Information
Description

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.

MATLAB release MATLAB 7.11 (R2010b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Updates
22 May 2013

A mispelling in a comment

Contact us