Residual:
--------------------------------------------------------------------------
Generates residual, measurement matrix and measurement noise matrix.
Handles linear and nonlinear systems. The latter use the Jacobian
of the measurement function. The former uses the h matrix. For
nonlinear systems .h is the pointer to the measurement function.
This handles empty y matrices.
--------------------------------------------------------------------------
Form:
[z, h, r] = Residual( y, f )
--------------------------------------------------------------------------
------
Inputs
------
y (m) Measurement data structure
.data (:,1) Measurements
.param (1,1) Parameter data structure
.hFun (1,:) Pointer to measurement function
.hData (1,1) Data structure for measurement function data
.r (:,:) Measurement covariance matrix
f (1,1) Filter data structure
.m (n,1) State vector
-------
Outputs
-------
z (m,1) Residual
h (m,n) Linearized measurement matrix y = h*x or
r (m,m) Noise covariance matrix
--------------------------------------------------------------------------
Children:
Math: Analysis/Jacobian