octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #41546] warning ("pinv: tol is ignored for dia


From: Ceral Paquet
Subject: [Octave-bug-tracker] [bug #41546] warning ("pinv: tol is ignored for diagonal matrices");
Date: Tue, 18 Feb 2014 08:23:29 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:27.0) Gecko/20100101 Firefox/27.0

Follow-up Comment #6, bug #41546 (project octave):

Watch out for the sign. As it is stands, the new code uses retval.elem(i, i) =
1.0 / val (which is the absolute value of the diagonal).

Please consider using the same handling as for the general case, i.e.

if (tol <= 0.0)
{
  tol = nc * sigma.elem (0) * std::numeric_limits<double>::epsilon ();
}

otherwise there will be slight differences for diagonal matrices.

Just for kicks, I checked to see if SVD with nargout=1 has special handling
for diagonal matrices: it doesn't. Perhaps it should (it's just the sorted
absolute values of the diagonal).

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41546>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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