Why does MATLAB's built-in "chol" yield a large error compared to my written algorithm
显示 更早的评论
I wish to know why MATLAB's built-in function
chol
yields a large error on a matrix
S=randi([1,100],[25,25]);
A=S'*S;
[B]=chol(A)
Executing the above code and calculating the norm
produced a massive error :
norm(A-B*B')
>>> 1.4697e+06
How could this be justified knowing that I wrote a modified Cholesky decomposition algorithm that producd an error of magnitude :
9.4093e-11
which is way less than MATLAB's built-in "chol". The reason I am asking is because I thought MATLAB have their matrix operations algorithms optimized using LAPAK which is written in fortan.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Decomposition 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!