powered by
Simulate 2D particle trajectory follows Ornstein–Uhlenbeck process(OU) for M particles.
M
ou_particle_intensity(pos0, M, len_t, sigma, rho)
Position matrix with dimension M\(\times\)len_t
len_t
by 2 for particle trajectory. The first M rows being the initial position pos0.
pos0
initial position for M particles, matrix with dimension M by 2
number of particles
number of time steps
distance moved per time step
correlation between successive step and previous step, value between 0 and 1
tools:::Rd_package_author("AIUQ")
library(AIUQ) M = 10 len_t = 50 sigma = 2 rho = 0.95 pos0 = matrix(100/8+0.75*100*runif(M*2),nrow=M,ncol=2) pos = ou_particle_intensity(pos0=pos0,M=M,len_t=len_t,sigma=sigma, rho=rho)
Run the code above in your browser using DataLab