UDFactor

Performs the U-D factorization of a symmetric matrix.
2.6K Downloads
Updated 9 Jul 2008

View License

[U D] = UDFactor(P) returns matrices U and D such that U.'*D*U = P
[U D] = UDFactor(P,uflag) returns matrices U and D such that U*D*U.' = P
when uflag is set to TRUE. Setting uflag to FALSE is equivalent to
running UDFactor with only one argument.

The alogrithm of UDFactor is similar to the Cholesky decomposition except
that the matrix is factored into a unitary upper triangular matrix (U)
and diagonal matrix (D) such that P = U*D*U.' (or U.'*D*U). Note that
while this is equivalent to P = (U*D^0.5)*(U*D^0.5).' = S*S.' where S is
the upper triangular square root of P, no square roots are taken in the
calculations of U and D. This makes this factorization ideal for a
square-root implementation of a Kalman filter (a U-D filter). For more
details, see Bierman, G. J., Factorization methods for discrete
sequential estimation, 1977.

Note: This factorization is only guaranteed to work for symmetric
matrices.

Examples:
%create symmetric matrix
P = rand(5)*10;, P = triu(P)+triu(P).';
%factor
[U1,D1] = UDFactor(P);
[U2,D2] = UDFactor(P,true);
%check factorization
P - U1.'*D1*U1
P - U2*D2*U2.'

Cite As

Dmitry Savransky (2024). UDFactor (https://www.mathworks.com/matlabcentral/fileexchange/20600-udfactor), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Linear Algebra in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0