np.linalg.cholesky matlab chol()

 matlab chol()

[S]=chol(Ppr2)';

 

np.linalg.cholesky 

print("============="*20)
Ppr2=np.array([[0.0119,-0.0832,-0.0287,-0.0072,0.0011],[-0.0832,5.2764,1.8354,0.7185,-0.0068],[-0.0287,1.8354,0.6494,0.2641,0.0005],[-0.0072,0.7185,0.2641,0.3383,0.0480],[ 0.0011,-0.0068,0.0005,0.0480,0.0100]])

Ppr2_1 = 10000*Ppr2
print(Ppr2_1)
print(np.linalg.cholesky(Ppr2_1))

 

 

=======================================================================
[[ 1.1900e+02 -8.3200e+02 -2.8700e+02 -7.2000e+01 1.1000e+01]
[-8.3200e+02 5.2764e+04 1.8354e+04 7.1850e+03 -6.8000e+01]
[-2.8700e+02 1.8354e+04 6.4940e+03 2.6410e+03 5.0000e+00]
[-7.2000e+01 7.1850e+03 2.6410e+03 3.3830e+03 4.8000e+02]
[ 1.1000e+01 -6.8000e+01 5.0000e+00 4.8000e+02 1.0000e+02]]


[[ 1.09087121e+01 0.00000000e+00 0.00000000e+00 0.00000000e+000.00000000e+00]
[-7.62693150e+01 2.16672545e+02 0.00000000e+00 0.00000000e+000.00000000e+00]
[-2.63092469e+01 7.54475459e+01 1.04638110e+01 0.00000000e+000.00000000e+00]
[-6.60022918e+00 3.08373405e+01 1.34512440e+01 4.69846724e+010.00000000e+00]
[ 1.00836835e+00 4.11107141e-02 2.71676440e+00 9.55298470e+005.84104234e-01]]

(wind_2021) F:\PythonProject\CKF_202107>
(wind_2021) F:\PythonProject\CKF_202107>
(wind_2021) F:\PythonProject\CKF_202107>

#############################

posted @ 2021-07-09 20:58  西北逍遥  阅读(224)  评论(0编辑  收藏  举报