Learn R Programming

AIUQ (version 0.5.3)

numerical_msd: Compute numerical MSD

Description

Compute numerical mean squared displacement(MSD) based on particle trajectory.

Usage

numerical_msd(pos, M, len_t)

Value

A vector of numerical MSD for given lag times.

Arguments

pos

position matrix for particle trajectory. See 'Details'.

M

number of particles

len_t

number of time steps

Author

tools:::Rd_package_author("AIUQ")

Details

Input pos should be the position matrix with dimension M\(\times\)len_t. See bm_particle_intensity, ou_particle_intensity, fbm_particle_intensity, fbm_ou_particle_intensity.

Examples

Run this code
library(AIUQ)
# Simulate particle trajectory for BM
M = 10
len_t = 50
sigma = 0.5
pos0 = matrix(100/8+0.75*100*runif(M*2),nrow=M,ncol=2)
pos = bm_particle_intensity(pos0=pos0,M=M,len_t=len_t,sigma=sigma)

# Compute numerical MSD
(num_msd = numerical_msd(pos=pos, M=M, len_t = len_t))

Run the code above in your browser using DataLab