2%> Generate and
return the inverse of a positive-definite matrix
3%> whose Lower-triangular Cholesky factorization is given as input.<br>
5%> \param[in] cholow : The input square matrix representing the lower-triangular
6%> Cholesky factorization whose inverse must be computed.<br>
9%> ``invmat`` : The output square positive-definite matrix, representing the inverse of
10%> the matrix whose lower-triangular Cholesky factorization is given as input.<br>
15%> invmat = pm.matrix.inv(cholow);
20%> See *Matrix Inversion Using Cholesky Decomposition*, Aravindh Krishnamoorthy, Deepak Menon, (arXiv:1111.4144).<br>
23%> \include{lineno} example/matrix/
inv/main.m
25%> \include{lineno} example/matrix/
inv/main.out.m
29%> This function builds upon the work of Aravindh Krishnamoorthy (2024).
30%> [Matrix Inversion
using Cholesky Decomposition](https:
31%> MATLAB Central File Exchange.<br>
34%> \JoshuaOsborne, May 21 2024, 12:06 AM, University of Texas at Arlington<br>
35%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
36%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
37function invmat =
inv(cholow)
41 ndim = size(cholow, 1);
42 invmat = zeros(ndim, ndim);
44 %%%% Construct the auxillary diagonal matrix ``auxdia = 1 / rii``.
46 auxdia =
inv(diag(diag(cholow)));
48 %%%% Compute the inverse.
52 invmat(i, j) = auxdia(i, j) - cholow(i + 1 : end, i)
' * invmat(i + 1 : end, j);
53 invmat(i, j) = invmat(i, j) / cholow(i, i);
55 %%%% Write out the symmetric element.
57 invmat(j, i) = conj(invmat(i, j));
function inv(in cholow)
Generate and return the inverse of a positive-definite matrix whose Lower-triangular Cholesky factori...