wilkinson: wilkinson Matrix

View source: R/wilkinson.R

wilkinsonR Documentation

wilkinson Matrix

Description

Generate the Wilkinson matrix of size n x n.The Wilkinson matrix for testing eigenvalue computations

Usage

wilkinson(n)

Arguments

n

integer

Details

The Wilkinson matrix for testing eigenvalue computations is a symmetric matrix with three non-zero diagonals and with several pairs of nearly equal eigenvalues.

Value

matrix of size n x n

Note

The two largest eigenvalues of wilkinson(21) agree to 14, but not 15 decimal places.

See Also

Toeplitz

Examples

(a <- wilkinson(7))
eig(a)

pracma documentation built on Nov. 10, 2023, 1:14 a.m.