R/makematrix.R

"makematrix" <-
function (n) 
{
    x <- runif(n)
    y <- runif(n)
    Ag <- outer(x, x, "-")^2 + outer(y, y, "-")^2
    Ag <- (2 - Ag)/10
    diag(Ag) <- 0
    diag(Ag) <- 1/n + apply(Ag, 2, sum)
    Ag
}

Try the edesign package in your browser

Any scripts or data that you put into this service are public.

edesign documentation built on May 2, 2019, 8:24 a.m.