I am making a square-root UKF implementation. I also use cholupdate function in Matlab. However cholupdate needs a positive definite matrix. The positive definiteness is tested using [R,p] = chol(A) where p produces 0. Then after running cholupdate, generates an error saying A is not positive definite. My problem is.
Does
[R,p] = chol(A)returnp=0meansAis positive-definite always?What is the best method for making a positive definite matrix. Note that here
Ais a square-root matrix where $AA^T$ gives a covariance matrix.
Any help is greatly appreciated.
p=0meansAis positive definite. For your second question, note that a Gram matrix ($AA^{\top}$) is positive semidefinite, and you can always 'boost' the eigenvalues of any matrix by adding $cI$ to it; for sufficiently large $c$, $cI+A$ will be positive definite. – shabbychef Dec 3 '12 at 6:49