|||
install.packages("pracma")
library(pracma)
n <- 36
x <- c(1, 1, -1, -1, runif(n-4, -1, 1)) # add four vertices
y <- c(1, -1, 1, -1, runif(n-4, -1, 1))
u <- cbind(x, y)
v <- numeric(n)
for (i in 1:n) v[i] <- f(c(x[i], y[i]))
kriging(u, v, c(0, 0)) #=> 0.006177183
kriging(u, v, c(0, 0), type = "simple") #=> 0.006229557
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-12-23 09:44
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社