当前位置:网站首页>Fundamentals of UD decomposition of KF UD decomposition [1]
Fundamentals of UD decomposition of KF UD decomposition [1]
2022-07-06 12:54:00 【Proletarians】
It's going on KF UD When decomposing , Variance of state vector - Covariance matrix P Yes, it is UD In the form of ,UD Decomposition is its foundation , The purpose of this article is to reduce the number of UD Decomposed learning time , If it can play the role of throwing bricks and attracting jade, it would be better .
One 、 The purpose of this chapter is three :
First , Let's be clear , What kind of matrix is a symmetric positive definite matrix ?
secondly , We need to know ,UD The form of decomposition is as follows :P=UDU^T, among ,U Is a unit upper triangular matrix ,D It's a diagonal matrix .
Last , We need to be able to code , That is, given a symmetric positive definite matrix P, You get the matrix U and D.
The following is lazy operation , Put the screenshot of the document directly ...

stay matlab Chinese handwriting UD The decomposed code is as follows , Please ignore code robustness :
% Realize the symmetric positive definite matrix UD decompose
% demo
% U = 1 2 3 4 D = 1 0 0 0 P = 95 66 38 16
% 0 1 2 3 0 3 0 0 66 47 28 12
% 0 0 1 2 0 0 2 0 38 28 18 8
% 0 0 0 1 0 0 0 4 16 12 8 4
P=[95 66 38 16;
66 47 28 12;
38 28 18 8;
16 12 8 4];
% P=[ 220 166 113 66 25
% 166 127 88 52 20
% 113 88 63 38 15
% 66 52 38 24 10
% 25 20 15 10 5];
% UD Principle of decomposition ( From right to left , From bottom to top , List before you go )
% because P Is a symmetric positive definite matrix , Only need to P The upper triangular element of
% 1、 Calculation P Number of matrix columns of
[pi,pj]=size(P);
U=diag(ones(pi,1));
D=diag(ones(pi,1));
if pj>1
disp('matrix P is ok!')
for i=pj:-1:1
Pii=P(i,i);
P_D_num=pj-i; % according to Pii To calculate Dii when , need D Number of elements
u2d=0.0;
if P_D_num>0
ip1=i+1;
for k=ip1:pj
u2d=u2d+D(k,k)*U(i,k)*U(i,k);
end
end
D(i,i)=Pii-u2d; % dii
disp(['P_col= ',num2str(i)])
if i==1
disp('UD over!') % First column
elseif i==pj
for j=1:pj-1
U(j,pj)=P(j,pj)/D(i,i); % The last column
end
else
ip1=i+1; % plus 1
im1=i-1; % minus 1
for k=1:im1;
disp(['P_row= ',num2str(k)])
udu=0.0;
for j=ip1:pj
udu=udu+U(k,j)*U(i,j)*D(j,j);
end
if j==pj
U(k,i)=(P(k,i)-udu)/D(i,i);
end
end
end
disp('-----------')
end
end
disp('D')
D
disp('U')
U
边栏推荐
- FairyGUI复选框与进度条的组合使用
- rtklib单点定位spp使用抗差估计遇到的问题及解决
- wsl常用命令
- 3月15号 Go 1.18 正式版发布 了解最新特色以及使用方法
- SVN更新后不出现红色感叹号
- Excel导入,导出功能实现
- How to reduce the shutdown time of InnoDB database?
- C code implementation of robust estimation in rtklib's pntpos function (standard single point positioning spp)
- [algorithm] sword finger offer2 golang interview question 4: numbers that appear only once
- [algorithm] sword finger offer2 golang interview question 6: sum of two numbers in the sorting array
猜你喜欢
![[算法] 剑指offer2 golang 面试题3:前n个数字二进制形式中1的个数](/img/64/0f352232359c7d44f12b20a64c7bb4.png)
[算法] 剑指offer2 golang 面试题3:前n个数字二进制形式中1的个数

FairyGUI簡單背包的制作

idea问题记录

Design and implementation of general interface open platform - (39) simple and crude implementation of API services

On March 15, the official version of go 1.18 was released to learn about the latest features and usage

Matlab读取GNSS 观测值o文件代码示例

FairyGUI增益BUFF數值改變的顯示
![[algorithme] swordfinger offer2 golang question d'entrevue 2: addition binaire](/img/c2/6f6c3bd4d70252ba73addad6a3a9c1.png)
[algorithme] swordfinger offer2 golang question d'entrevue 2: addition binaire

The port is occupied because the service is not shut down normally

FairyGUI循环列表
随机推荐
[algorithme] swordfinger offer2 golang question d'entrevue 2: addition binaire
[Chongqing Guangdong education] reference materials for regional analysis and planning of Pingdingshan University
RTKLIB: demo5 b34f.1 vs b33
第一人称视角的角色移动
Unity3D,阿里云服务器,平台配置
FairyGUI增益BUFF數值改變的顯示
C code implementation of robust estimation in rtklib's pntpos function (standard single point positioning spp)
[GNSS data processing] Helmert variance component estimation analysis and code implementation
[Yu Yue education] guide business reference materials of Wuxi Vocational and Technical College of Commerce
[offer29] sorted circular linked list
Wechat applet development experience
[leetcode622] design circular queue
FairyGUI增益BUFF数值改变的显示
微信小程序开发心得
堆排序【手写小根堆】
编辑距离(多源BFS)
【无标题】
Liste des boucles de l'interface graphique de défaillance
(the first set of course design) 1-4 message passing interface (100 points) (simulation: thread)
[untitled]