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.

   If you don't specify an integrator with the field
   d.integrator = @myIntegratorName
   it will use RK4.

   The filter appends internal data to the datastructure

   To initialize call

      d = UKF( 'initialize', d );

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

   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 );

-------------------------------------------------------------------------------
   Form:
   d = UKF( action, d, y )
-------------------------------------------------------------------------------

   ------
   Inputs
   ------
   action    (1,:)  'initialize' or 'update'
   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
                    .t           (1,1) Time
   y         (m,1)  Measurement vector

   -------
   Outputs
   -------
   d         (1,1)  UKF data structure with the following appended
                    .dX          (1,1) Number of states
                    .n           (1,1) Twice the number of states
                    .y           (m,1) Measurements based on the states
                    .xA          {n}   Sigma points

-------------------------------------------------------------------------------
   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: Math/RK4