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