octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: panic on solving rank-deficient equations


From: Jaroslav Hajek
Subject: Re: panic on solving rank-deficient equations
Date: Sun, 2 Mar 2008 18:39:42 +0100

> On 29-Feb-2008, Michael Friedlander wrote:
>
> | This patch does seem to avoid the problem mentioned below.
> | However, it does not work for the complex case, ie,
> |
> |      for n=1:100
> |          R=triu(randn(n)+i*randn(n)); R(n,n)=0; b=randn(n,1);
> |          x=R\b;
> |      end
>
> I'd appreciate it if someone could submit a patch that works then.  I
> gave it my best shot, and I think an outline for how it should be
> done.  The hard part at this point is digging through the LAPACK code
> and determining what the actual workspace requirements are.  If I got
> it wrong, and the description in the ZGELSD comments is correct, then
> t should be easy to fix.  Otherwise, I'd suggest asking for help from
> the LAPACK maintainers since the xGELSD routines seem buggy and the
> comments apparently don't correctly describe the workspace
> requirements.
>
> jwe

hello,
the attached changeset gets rid of the segfault in case of the above
code snippet. The problem was simply
to get the calculation right in all places. Btw. is the
Matrix::lssolve(ColumnVector& ...) specialization
actually worth its own existence?

regards,

-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz

Attachment: gelsdwrk.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]