isHermitian: Is a Matrix Hermitian?

Description Usage Arguments Details Author(s) Examples

Description

Returns TRUE if a matrix is Hermitian or Hermitian positive-definite

Usage

1
2
3
isHermitian(x, tol = 100 * .Machine$double.eps)
ishpd(x,tol= 100 * .Machine$double.eps)
zapim(x,tol= 100 * .Machine$double.eps)

Arguments

x

A square matrix

tol

Tolerance for numerical scruff

Details

Functions isHermitian() and ishpd() return a Boolean. Function zapim() zaps small imaginary parts of components vector, returning real if all elements are so zapped.

Author(s)

Robin K. S. Hankin

Examples

1
2
3
4
5
6
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

cmvnorm documentation built on Aug. 16, 2018, 9:05 a.m.