Description Usage Arguments Value Examples
View source: R/is_sym_pos_def.R
The function checks the numeric matrix A for symmetricity (Hermitian for complex matrices) first and then for non-zero eigenvalues
1 |
A |
Numeric matrix (real or complex) |
TRUE indicates that the matrix A is symmetric (Hermitian) positive definite
1 2 3 4 5 6 7 8 9 10 11 | A<-matrix(c(1,2,3,4),2,2) # not symmetric
is_sym_pos_def(A) # FALSE
A<-matrix(c(1,2,2,1),2,2) # Symmetric but an eigen value is not positive
is_sym_pos_def(A) # FALSE
A<-matrix(c(2,1,1,2),2,2) # Both symmetric and eigen values are positive
is_sym_pos_def(A) # TRUE
A<-matrix(c(4,2-3i,2+3i,3),2,2) # Hermitian but one eigen value is not positive
is_sym_pos_def(A) # FALSE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.