| isHermitian | R Documentation |
Returns TRUE if a matrix is Hermitian or Hermitian positive-definite
isHermitian(x, tol = 100 * .Machine$double.eps)
ishpd(x, tol = 100 * .Machine$double.eps)
zapim(x, tol = 100 * .Machine$double.eps)
x |
A square matrix |
tol |
Tolerance for numerical scruff |
Functions isHermitian() and ishpd() return a Boolean,
indicating whether the argument is Hermitian or Hermitian positive
definite respectively. Function zapim() zaps small imaginary
parts of a vector, returning real if all elements are so zapped.
Robin K. S. Hankin
v <- 2^(1:30)
zapim(v + 1i*exp(-v))
ishpd(matrix(c(1, 0.1i, -0.1i, 1), 2, 2)) # should be TRUE
isHermitian(matrix(c(1, 3i, -3i, 1), 2, 2)) # should be TRUE
ishpd(rcwis(6, 2)) # should be TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.