mldivide condition number

Hi!
I notice that matlab calculates the condition number when it runs mldivide. In cases the matrix is singular it provides a warning in the screen. Is it possible to have the condition number from the mldivide function itself? This is because in my code the matrix operation is calculated thousands of times, and whenever the condition number indicates the matrix is close not to being invertible I need to automatize the end of a loop. Currently I calculate the condition number explicitly, but I want to improve the efficiency of the code.

답변 (2개)

Oleg Komarov
Oleg Komarov 2011년 6월 27일

0 개 추천

No you cannot.
Explicitly means you are using cond?
Did you try the profiler to check where are the bottlenecks?

댓글 수: 1

gabriel villalobos
gabriel villalobos 2011년 6월 27일
Thanks for the answer. I am using condest, since the matrix is sparse.

댓글을 달려면 로그인하십시오.

Titus Edelhofer
Titus Edelhofer 2011년 6월 27일

0 개 추천

Hi,
have you tried to play around with lastwarn? Find out if your mldivide produced a warning and react to this one? Or do you need this before doing the mldivide?
Titus

카테고리

도움말 센터File Exchange에서 Performance and Memory에 대해 자세히 알아보기

질문:

2011년 6월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by