UKF:

--------------------------------------------------------------------------
   Implement an Unscented Kalman Filter.
   The filter uses numerical integration to propagate the state.
   The filter propagates sigma points, points computed from the
   state plus a function of the covariance matrix. For each state
   there are two sigma states.

   The default integrator is RK4, or specify an integrator with the field

      d.integrator = @myIntegratorName

   To initialize UKF call

      d = UKF( 'initialize', d );

   To update
 
      d = UKF( 'update', d, y );

   The filter appends internal data to the datastructure.
   d.x gives the current estimated state and d.pXX the state covariance.

   The measurement function is of the form 

      meas = MeasFun( x, dMeasFun );

   The state function is of the form

      xDot = StateFun( x, t, dStateFun );

   You can use either the Cholesky transform or matrix square root to
   form the sigma points.

   Since version 9.
--------------------------------------------------------------------------
   Form:
   d = UKF( action, d, y )
   d = UKF( 'datastructure', nStates, nMeas )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   action    (1,:)  'initialize' or 'update' or 'datastructure'
   d         (1,1)  UKF data structure
                    .rHSFun        (1,:) Name of RHS function
                    .integrator    (1,:) Pointer to integrator function
                    .rHSFunData	(1,1) RHS function data structure
                    .measFun       (1,:) Name of measurement function
                    .measFunData	(1,1) Measurement function data 
                    .x             (n,1) Initial state vector
                    .p             (n,n) Covariance matrix for x   
                    .dY            (1,1) Number of measurements        
                    .dX            (1,1) Number of states        
                    .rP            (n,n) Process noise covariance        
                    .rM            (n,n) Measurement noise covariance
                    .alpha         (1,1) Scaling 1e-4 <= alpha <= 1
                    .kappa         (1,1) Secondary scaling usually 0
                    .beta          (1,1) Prior knowledge of distribution = 2
                                         for Gaussian distributed noise
                    .dT            (1,1) Time step
                    .sigmaPtAlg    (1,1) 1 = sqrtm, 2 = chol
                    .t             (1,1) Time
   y         (m,1)  Measurement vector
   verbose   (1,1)  Flag for verbose output. 1 = warn, 2 = error.

   -------
   Outputs
   -------
   d         (1,1)  UKF data structure with the following appended
                    .dX          (1,1) Number of states
                    .n           (1,1) Number of sigma points
                    .y           (m,1) Measurements based on the states
                    .xA          {n}   Sigma points
                    .pP          (n,n) Covariance matrix prior to
                                        measurement
                    .xP          (n,1) State vector prior to measurement
                                       incorporation
   
--------------------------------------------------------------------------
   References: Voss, H. U., Timmer, J., Kurths, J., "Nonlinear Dynamical System
               Identification from Uncertain and Indirect Measurements," 
               International Journal of Bifurcation and Chaos, Vol. 14, No. 6,
               2005, pp. 1905-1933.
               Van der Merwe, R. and Wan, E., "Sigma-Point Kalman Filters for
               Probabilistic Inference in Dynamic State-Space Models",
--------------------------------------------------------------------------

Children:

Common: DemoFuns/GXUKF
Common: DemoFuns/RHSUKF
Common: Estimation/SigmaPointsChol
Math: Integration/RK4