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