octave-maintainers
[Top][All Lists]
Advanced

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

Re: half-assed rcond


From: David Bateman
Subject: Re: half-assed rcond
Date: Sat, 01 Sep 2007 13:55:12 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

Søren Hauberg wrote:
> Hi,
>   For some time I've been using some written-for-matlab code that
> requires the 'rcond' function, which Octave doesn't have. For this I've
> been using the following half-assed implementation:
> 
> function rc = rcond(A)
>   [dont_care, rc] = det(A);
> endfunction
> 
> Just wondering if you wanted a documented, error-checking, etc., version
> of the above code, or if that implementation is too in-efficient?
> 
> Søren
> 


Why not use

function rc = rcond (A)
  [dum, rc] = inv (A);
endfunction

This isn't half-assed though you pay the cost of an additional back
substitution to form the inverse from the factorization when you don't
really need it.

D.


reply via email to

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