Learn R Programming

MHadaptive (version 1.1-8)

positiveDefinite: Positive Definite Matrixes

Description

Checks if a matrix is positive definite and/or forces a matrix to be positive definite.

Usage

isPositiveDefinite(x) makePositiveDefinite(x)

Arguments

x
a square numeric matrix.

Details

The function isPositiveDefinite checks if a square matrix is positive definite. The function makePositiveDefinite forces a matrix to be positive definite. These functions were originally implimented in fUtilities Copyright: (c) 1999-2008 Diethelm Wuertz and Rmetrics Foundation URL: http://www.rmetrics.org

Examples

Run this code
## isPositiveDefinite - 
   # is the 3x3 identity matrix positive definate?
   isPositiveDefinite(diag(c(1,1,1)))                

Run the code above in your browser using DataLab