importanceweights1.m
来自「对运动声目标进行航迹跟踪」· M 代码 · 共 21 行
M
21 行
function q = importanceweights(xu,y,R);
% PURPOSE : Computes the normalised importance ratios for the
% model described in the file sirdemo1.m.
% INPUTS : - xu = The predicted state samples.
% - y = The output measurements.
% - R = The measurement noise covariance.
% OUTPUTS : - q = The normalised importance ratios.
% AUTHOR : Nando de Freitas - Thanks for the acknowledgement :-)
% DATE : 08-09-98
if nargin < 3, error('Not enough input arguments.'); end
[rows,cols] = size(xu);
q = zeros(size(xu));
m = (xu.^(2))./20;
for s=1:rows,
q(s,1) = exp(-.5*R^(-1)*(y- m(s,1))^(2))./sum(exp(-.5*R^(-1)*(y.*ones(size(xu))-m).^(2)));
end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?