Move even/odd into the misc subdirectory.
[octave.git] / is_positive_definite.m
1 function ipd = is_positive_definite(A)
2 % Returns true if A is positive-definite, and false otherwise. We
3 % perform a full Cholesky factorization, so this is not fast.
4
5 ipd = false;
6
7 [R,p] = chol(A);
8
9 if (p == 0)
10 % The error flag is not set.
11 ipd = true;
12 end
13 end