[Top][All Lists]

[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: Thu, 13 Feb 2014 13:47:02 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:27.0) Gecko/20100101 Firefox/27.0

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

Interestingly pinv([q],2) gives the right answer. i.e. the extra square braces
cause the diagonal property to be lost.


ans =

   0.33333   0.00000   0.00000
   0.00000   0.50000   0.00000
   0.00000   0.00000   1.00000

I can see in the source code what needs to be done but currently I don't know
how to go about it.


The pseudo_inverse(void) needs to be changed to accept tol as an argument and
the loop needs to be modified a little:

400  if (abs(elem (i, i)) > tol)
401      retval.elem (i, i) = 1.0f / elem (i, i);
402  else
403      retval.elem (i, i) = 0.0f;

Ditto for the complex and double precision versions.

Regarding the loss of diagonality of [q], I have no idea what to do!


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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