[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matri
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A |
Date: |
Fri, 02 Oct 2015 21:04:02 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0 |
Update of bug #46103 (project octave):
Status: None => Need Info
_______________________________________________________
Follow-up Comment #5:
For something simple like 2+2 there is a very well-defined output. For
something more complex like the inverse of a singular matrix there are several
possibilities and arguments can be made for each one. I am advocating
following the Principle of Least Surprise. The implementation of diagonal
matrices is optimized in Octave, but users don't need to know or understand
that. To them, a diagonal matrix is the same as a regular matrix and the same
calculation should yield the same result irrespective of what Octave has used
for the underlying object type.
One useful test is to have the following code run under Matlab
inv (diag (0:2))
If this produces a 3x3 matrix of Inf values then that is what Octave should
also produce.
I can't tell from comment #3 which is considered the odd behavior: 1)
returning the original matrix, or 2) returning an all Inf matrix. I certainly
want to stop using method 1. And for the next question, I would prefer to
return Inf (3,3) rather than diag (Inf (3, 1))
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46103>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A, jan, 2015/10/08
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A, Mike Miller, 2015/10/08
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A, Rik, 2015/10/08
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A, jan, 2015/10/08
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A, jan, 2015/10/08
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A,
Rik <=
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A, jan, 2015/10/08
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A, Mike Miller, 2015/10/08
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A, jan, 2015/10/08
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A, Rik, 2015/10/08
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A, Mike Miller, 2015/10/08
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A, Rik, 2015/10/08
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A, Michael Godfrey, 2015/10/08
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A, Rik, 2015/10/08
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A, jan, 2015/10/08
- [Octave-bug-tracker] [bug #46103] inversion of a singular diagonal matrix A produces inv(A)==A, jan, 2015/10/08