obsup.m

来自「Kalman Filtering Theory and Practice, Us」· M 代码 · 共 19 行

M
19
字号
function [x,P] = obsup[x,P,z,H,R]
%
% function [x,P] = obsup[x,P,z,H,R]
%
% Performs Kalman filter observational update of state vector, x
% and the associated covriance matrix of estimation uncertainty, P
%
% Inputs  x is n-by-1 (column) state vector
%         P is n-by-n symmetric pos. def. matrix
%         z is m-by-1 measurement (observation) vector
%         H is m-by-n measurement sensitivity matrix
%         R is m-by-m covariance matrix of meas. uncertainty
% Outputs x,P updated by observation y
%
PHt = P*H';
K   = PHt/(H*PHt+R);
x   = x + K*(y-H*x);
P   = P - K*PHt';

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?