function R = chol2(A) % R = chol2(A) % % Returns an upper triangular R such that % R * R' is a factorization of % a symmetric, positive definite A % % Written by Tao Zha, July 1996 %* The following two lines give another expression of the same result %%function [R,p] = chol2(A) %%[R,p] = chol(fliplr(flipud(A))); R = chol(fliplr(flipud(A))); R = fliplr(flipud(R))';