
Check if a matrix is symmetric and positive definite
is.spd.RdCheck if a matrix is symmetric and positive definite
Arguments
- ...
One or more numeric matrices
- tol
Numerical tolerance for checking symmetry and positive definiteness
Details
Function checks whether the matrix x is symmetric and positive
definite. Symmetry is evaluated up to an entrywise tolerance of tol, so
that differences smaller than tol are ignored. Positive-definiteness is
checked by computing the eigenvalues of x using eigen, setting
eigenvalues smaller than tol in absolute value to zero, and then checking
whether any are less than or equal to zero.