Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Ill conditioned matrix makes linsolve crash
Date: Thu, 29 Oct 2009 13:18:03 +0000 (UTC)
Organization: ErasmusMC
Lines: 32
Message-ID: <hcc4ma$rso$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1256822283 28568 172.30.248.35 (29 Oct 2009 13:18:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 29 Oct 2009 13:18:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1095751
Xref: news.mathworks.com comp.soft-sys.matlab:580960


Dear users,

I am trying to solve a very ill conditioned system with linsolve, but it makes Matlab hang. 

The matrix A is symmetric and ill-conditioned:
>> rcond(A)
ans =
   5.7435e-21

>> max(max(abs(triu(A)-tril(A)')))
ans =
     0

I try to solve this using linsolve (with SYM=false it works):
linsolvopts = 
       SYM: 1
    POSDEF: 0

Executing:
>> [x, rcond] = linsolve(A, b, linsolvopts);

makes Maltab unresponsive. Apparently, the LAPACK subroutine dsysv (which is the one used I think) crashes.

I know I should not try to solve these kind of ill-conditioned matrices, but I use rcond result from linsolve to check if the result may make sense. However, I do not believe dsysv is supposed to crash.

I have tried it with 2009a/b x86_64 on Linux and on another machine with 2009a x68_32, Windows XP, all crash.

The matrix and vector can be downloaded here. It is a moderate 96x96 sized problem (76kiB):
http://www.xs4all.nl/~pukenmul/downloads/ProblemMat.mat

Thanks!
Sebastiaan