Main Content

residual

Measurement residual and residual noise from tracking filter

Description

[zres,rescov] = residual(filter,zmeas) computes the residual and residual covariance of the current given measurement, zmeas, with the predicted measurement in the tracking filter, filter. This function applies to filters that assume a Gaussian distribution for noise.

[zres,rescov] = residual(filter,zmeas,measparams) specifies additional parameters that are used by the MeasurementFcn of the filter.

If filter is a trackingKF object, then you cannot use this syntax.

Input Arguments

collapse all

Filter for object tracking, specified as one of these objects:

Current measurement of a tracked object, specified as a vector or matrix.

Parameters for measurement function, specified as a cell array. The parameters are passed to the measurement function that is defined in the MeasurementFcn property of the input filter. If filter is a trackingKF object, then you cannot specify measparams.

Output Arguments

collapse all

Residual between current and predicted measurement, returned as a matrix.

Residual covariance, returned as a matrix.

Algorithms

collapse all

The residual is the difference between a measurement and the value predicted by the filter. For Kalman filters, the residual calculation depends on whether the filter is linear or nonlinear.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2018a