The isposdef command checks whether the given symmetric matrix A∈ℝn× n is positive definite, i.e. whether xTAx>0 for all vectors x∈ℝn.
isposdef takes a symmetric matrix A as its only argument and returns true if A is positive definite and false otherwise. Note that this procedure does not check whether A is symmetric.
isposdef([[1,-1,2],[-1,4,3],[2,3,-5]]) |
|
isposdef([[1,-1,2],[-1,-2,3],[2,3,-5]]) |
|