Daniel@0: function b = isposdef(a) Daniel@0: % ISPOSDEF Test for positive definite matrix. Daniel@0: % ISPOSDEF(A) returns 1 if A is positive definite, 0 otherwise. Daniel@0: % Using chol is much more efficient than computing eigenvectors. Daniel@0: Daniel@0: % From Tom Minka's lightspeed toolbox Daniel@0: Daniel@0: [R,p] = chol(a); Daniel@0: b = (p == 0);