| euler1D | R Documentation | 
Simulation of the Wrapped Normal (WN) diffusion or von Mises (vM) diffusion by the Euler method in 1D, for several starting values.
euler1D(x0, alpha, mu, sigma, N = 100L, delta = 0.01, type = 1L,
  maxK = 2L, expTrc = 30)
| x0 | vector of length  | 
| alpha | drift parameter. | 
| mu | mean parameter. Must be in  | 
| sigma | diffusion coefficient. | 
| N | number of discretization steps. | 
| delta | discretization step. | 
| type | integer giving the type of diffusion. Currently, only  | 
| maxK | maximum absolute value of the windings considered in the computation of the WN. | 
| expTrc | truncation for exponential:  | 
A matrix of size c(nx0, N + 1) containing the nx0 discretized trajectories. The first column corresponds to the vector x0.
N <- 100
nx0 <- 20
x0 <- seq(-pi, pi, l = nx0 + 1)[-(nx0 + 1)]
set.seed(12345678)
samp <- euler1D(x0 = x0, mu = 0, alpha = 3, sigma = 1, N = N,
                delta = 0.01, type = 2)
tt <- seq(0, 1, l = N + 1)
plot(rep(0, nx0), x0, pch = 16, col = rainbow(nx0), xlim = c(0, 1))
for (i in 1:nx0) linesCirc(tt, samp[i, ], col = rainbow(nx0)[i])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.