# Scatterplots for Sobol g-function versus X1 and X2
n <- 2000
x <- matrix(nr = n, nc = 8)
for (i in 1:8)
x[, i] <- runif(n)
y <- sobol.fun(x)
plot(x[, 1], y)
plot(x[, 2], y)
# Scatterplots for the Ishigami function versus X1, X2 and X3
n <- 2000
x <- matrix(nr = n, nc = 3)
for (i in 1:3)
x[, i] <- runif(n, min = -pi, max = pi)
y <- ishigami.fun(x)
plot(x[, 1], y)
plot(x[, 2], y)
plot(x[, 3], y)
Run the code above in your browser using DataLab