KFUpdate:

Path: Common/Estimation

% Linear Kalman Filter measurement update step.

 This assumes a discrete model of the form:

 x[k] = a[k-1]x[k-1] + b[k-1]u[k-1]
 y[k] = h[k]x[k]

 All inputs are after the predict state (see KFPredict).
 The Kalman filter can be initialized using KFInitialize. This routine
 can use the data structure form of the measurement where the 
 measurement is in y.data.

 The inputs can be individual matrices or as part of a data structure.
 The data structure is d = struct('m',m,'p',p,'y',y,'h',h,'r',r);

 All Kalman Filter routines accept data structures.

--------------------------------------------------------------------------
   Forms:
   d = KFUpdate( d )
   [m,p,v,s,k] = KFUpdate( m, p, y, h, r )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   m             (n,1)  Mean vector
   p             (n,n)  Covariance matrix
   y             (m,1)  Measurement vector
   h             (m,n)  Measurement matrix
   r             (m,m)  Measurement noise matrix

   -------
   Outputs
   -------
   m             (n,1)  Mean vector
   p             (n,n)  Covariance matrix
   v             (n,n)  Residual vector
   s             (n,n)  Covariance denominator
   k             (n,n)  Kalman gain matrix

--------------------------------------------------------------------------

Back to the Common Module page