Does Matlab use a QR or LU decomposition when solving a matrix equation?
3 次查看(过去 30 天)
显示 更早的评论
When Matlab computes A\B or A\b does it first compute the LU decomposition of A or the QR decomposition? I'm having accuracy issues and trying to compare my answers to those I get in C using LAPACK.
Thanks very much.
David
0 个评论
采纳的回答
Honglei Chen
2012-7-16
There are actually some information regarding you question in the documentation
更多回答(1 个)
Paul Metcalf
2012-7-16
编辑:Paul Metcalf
2012-7-16
I don't know the answer to your question, but you will need to provide more details to get a proper response to your question. For example:
- Is your matrix A square?
- What is the size/order of A?
- When using C/LAPACK, what data types have you cast for A?
- Are your results only slightly different or dramatically different?
MATLAB using DOUBLE arithmetic for all internal operations. If you are not using real64 types in C, then you might be accumulating quantisation errors...
2 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!