is.hermitian: Check if a matrix is Hermitian.

Description Usage Arguments Value See Also Examples

Description

This function checks if a matrix is Hermitian, that is, if its below and above diagonal elements are equal.

Usage

1
is.hermitian(covmat)

Arguments

covmat

A square matrix.

Value

TRUE or FALSE.

See Also

is.pd to check if a matrix is positive-definite and is.within.bounds to check whether all covariances in a covariance matrix are within boundaries.

Examples

1
2
3
4
5
data(stiles)
st.cov <- cov(stiles[-1])
is.hermitian(st.cov) # TRUE
st.cov[5,3] <- 10
is.hermitian(st.cov) # FALSE

stremo documentation built on Jan. 15, 2017, 7:33 p.m.