UDKalmanFilter:

-------------------------------------------------------------------------------
   Implements a Kalman filter using UD factorization.
   First call

   d = UDKalmanFilter( 'p to ud', p )

   You need to add r, q, h, and x to d.
   Then call

   loop:
     d = UDKalmanFilter( 'incorporate measurement', d, z )
     d = UDKalmanFilter( 'propagate', d )
   end
   
-------------------------------------------------------------------------------
   Form:
   d = UDKalmanFilter( action, d, z )
-------------------------------------------------------------------------------

   ------
   Inputs
   ------
   action    (1,:)   Action to perform
   d         (1,1)   Data structure
                     .u   Upper triangular portion of the covariance matrix
                     .r   Measurement noise scalar
                     .q   State noise matrix
                     .h   Measurement equation
                     .x   State
                     .k   Gain (computed)
   z         (n,1)   Measurement(s)

   -------
   Outputs
   -------
   y         (:)     Depends on the action

-------------------------------------------------------------------------------
   References: Bierman, G. J. (1977) Factorization Methods for Discrete
               Sequential Estimation. Academic Press.
-------------------------------------------------------------------------------

Children: