Code covered by the BSD License  

Highlights from
UD Factorization & Kalman Filtering

UD Factorization & Kalman Filtering

by

 

15 Aug 2011 (Updated )

UD and LD factorization of nonnegative matrices and associated Kalman filter implementations.

[p]=ld2sym(ld)
% LD2SYM : Recover P from LD, an LDL factorization of P
%          L lower unit triangular, D diagonal, P nonnegative symmetric
%
%          [p]=ld2sym(ld)
%
%          p=l*d*l'; l unit lower triangular, d diagonal
%                    both stored in ld
%
%          See also sym2ld, ldt2sym, ldinv
%
%          References: Factorization methods for discrete sequential estimation
%                      1977, Gerald J. Bierman
%
% L.G. van Willigenburg, W.L. de Koning, Update August 2011
  function [p]=ld2sym(ld)
  
  [n,m]=size(ld);
  if n~=m; error('ld must be square'); end;
  if n==0; error('  Compatible but empty inputs'); end;

  d=diag(diag(ld));
  l=ld-d+diag(ones(1,n));
  p=l*d*l';

Contact us