Why does MATLAB's built-in "chol" yield a large error compared to my written algorithm
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!