# 1D
x <- seq(-pi, pi, l = 200)
plot(x, x, type = "n", ylab = "drift")
for (i in 0:20) {
lines(x, driftMvm(x = x, alpha = 3 * i / 20, mu = 0, A = 0),
col = rainbow(21)[i + 1])
}
# 2D
x <- seq(-pi, pi, l = 100)
plotSurface2D(x, x, f = function(x) sqrt(rowSums(driftMvm(x = x,
alpha = c(2, 2), mu = c(-1, -1),
A = rbind(c(0, 0), c(0, 0)))^2)),
fVect = TRUE)
Run the code above in your browser using DataLab