R/fn.isPD.R

## Function which checks whether a square matrix is positive definite
## __input__
## A   : [kxk matrix]
## __output__
## [logical] is the matrix positive definite?
## __20080427__
'fn.isPD' <- function(A)
  {
    as.logical(all(eigen(A)$values>0))
  }
    

Try the AdMit package in your browser

Any scripts or data that you put into this service are public.

AdMit documentation built on Feb. 8, 2022, 1:07 a.m.