Does Matlab use a QR or LU decomposition when solving a matrix equation?
조회 수: 5 (최근 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
Paul Metcalf
2012년 7월 18일
Glad you got it sorted. Out of curiosity, how long does your solution take?
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!