File: Hilbert.R

package info (click to toggle)
rmatrix 0.9975-6-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,136 kB
  • ctags: 2,162
  • sloc: ansic: 35,914; makefile: 225; fortran: 151; sh: 67
file content (6 lines) | stat: -rw-r--r-- 186 bytes parent folder | download
1
2
3
4
5
6
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 - 1:1, i, "+")), Dim = c(n,n))
}