Skip to content

method cholupdate() works incorrectly?  #1

@Shaofa

Description

@Shaofa

First, thanks for your sharing.
According to your comment,I checked en.wikipedia.org/wiki/Cholesky_decomposition#Rank-one_update, and finded the suprisings.So i copy these codes to a matlab script file named myCholupdate.m to check if they dose work! However,something goes wrong:
I just let

R = [1  2  3
     0  2  2
     0  0  1]

x = [1  2  3]'

firstly,i call cholupdate method assembled in MATLAB:cholupdate(R, x) and i get:

ans = [1.4142    2.8284    4.2426 
       0         2.0000    2.0000
       0         0         1.0000]

secondly, i call the method i copied myCholupdate(R, x),but i get:

ans = [1.4142    2.0000    3.0000
       1.4142    2.4495    2.0000
       2.1213    1.2247    2.0000]

I got a greate disparity.
I checked the method cholupdate in this repository, i think it's same this: en.wikipedia.org/wiki/Cholesky_decomposition#Rank-one_update.So, here are my issuses:

  1. What is the correct usage of the method myCholupdate?
    2.Have you ever done a comparison of your method cholupdate in C++ with the method cholupdate in MATLAB?If done, I'm eager to have a look becasue i got a knotty problem which has to do one rank cholesky updating.

THINK YOU VERY MUCH!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions