?? scaledsymmetricsigmapoints.m
字號(hào):
function [xPts, wPts, nPts] = scaledSymmetricSigmaPoints(x,P,alpha,beta,kappa)% This function returns the scaled symmetric sigma point distribution.%% [xPts, wPts, nPts] = scaledSymmetricSigmaPoints(x,P,alpha,beta,kappa) %% Inputs:% x mean% P covariance% alpha scaling parameter 1% beta extra weight on zero'th point% kappa scaling parameter 2 (usually set to default 0)%% Outputs:% xPts The sigma points% wPts The weights on the points% nPts The number of points%%%% (C) 2000 Rudolph van der Merwe % (C) 1998-2000 S. J. Julier.% Number of sigma points and scaling termsn = size(x(:),1);nPts = 2*n+1; % we're using the symmetric SUT% Recalculate kappa according to scaling parameterskappa = alpha^2*(n+kappa)-n;% Allocate spacewPts=zeros(1,nPts);xPts=zeros(n,nPts);% Calculate matrix square root of weighted covariance matrixPsqrtm=(chol((n+kappa)*P))'; % Array of the sigma pointsxPts=[zeros(size(P,1),1) -Psqrtm Psqrtm];% Add mean back inxPts = xPts + repmat(x,1,nPts); % Array of the weights for each sigma pointwPts=[kappa 0.5*ones(1,nPts-1) 0]/(n+kappa);% Now calculate the zero'th covariance term weightwPts(nPts+1) = wPts(1) + (1-alpha^2) + beta;
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -