-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathut_sigmas.m
35 lines (32 loc) · 933 Bytes
/
ut_sigmas.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
%UT_SIGMAS - Generate Sigma Points for Unscented Transformation
%
% Syntax:
% X = ut_sigmas(M,P,c);
%
% In:
% M - Initial state mean (Nx1 column vector)
% P - Initial state covariance
% c - Parameter returned by UT_WEIGHTS
%
% Out:
% X - Matrix where 2N+1 sigma points are as columns
%
% Description:
% Generates sigma points and associated weights for Gaussian
% initial distribution N(M,P). For default values of parameters
% alpha, beta and kappa see UT_WEIGHTS.
%
% See also UT_WEIGHTS UT_TRANSFORM UT_SIGMAS
%
% Copyright (C) 2006 Simo Särkkä
%
% $Id: ut_sigmas.m 109 2007-09-04 08:32:58Z jmjharti $
%
% This software is distributed under the GNU General Public
% Licence (version 2 or later); please refer to the file
% Licence.txt, included with the software, for details.
function X = ut_sigmas(M,P,c);
% A = schol(P);
A = chol(P)';
X = [zeros(size(M)) A -A];
X = sqrt(c)*X + repmat(M,1,size(X,2));