R/Hilbert.R

Defines functions Hilbert

Documented in Hilbert

Hilbert <- function(n)
{   ## generate the Hilbert matrix of dimension n
    n <- as.integer(n)
    i <- seq_len(n)
    new("dpoMatrix", x = c(1/outer(i - 1L, i, "+")), Dim = c(n,n))
}

Try the Matrix package in your browser

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

Matrix documentation built on Nov. 11, 2022, 9:06 a.m.