[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.
pinv([q],2)
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.
http://octave.sourceforge.net/doxygen/html/de/d18/fCDiagMatrix_8cc_source.html#l00390
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:
<http://savannah.gnu.org/bugs/?41546>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #41546] warning ("pinv: tol is ignored for diagonal matrices");, Ceral Paquet, 2014/02/11
- [Octave-bug-tracker] [bug #41546] warning ("pinv: tol is ignored for diagonal matrices");,
Ceral Paquet <=
- [Octave-bug-tracker] [bug #41546] warning ("pinv: tol is ignored for diagonal matrices");, Mike Miller, 2014/02/13
- [Octave-bug-tracker] [bug #41546] warning ("pinv: tol is ignored for diagonal matrices");, Rik, 2014/02/15
- [Octave-bug-tracker] [bug #41546] warning ("pinv: tol is ignored for diagonal matrices");, Ceral Paquet, 2014/02/17
- [Octave-bug-tracker] [bug #41546] warning ("pinv: tol is ignored for diagonal matrices");, Rik, 2014/02/17
- [Octave-bug-tracker] [bug #41546] warning ("pinv: tol is ignored for diagonal matrices");, Ceral Paquet, 2014/02/18
- [Octave-bug-tracker] [bug #41546] warning ("pinv: tol is ignored for diagonal matrices");, Ceral Paquet, 2014/02/18