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