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

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

[Octave-bug-tracker] [bug #51246] pinv(0) different from Matlab


From: Rik
Subject: [Octave-bug-tracker] [bug #51246] pinv(0) different from Matlab
Date: Fri, 16 Jun 2017 11:50:24 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0

Update of bug #51246 (project octave):

                  Status:                    None => In Progress            
                 Summary:                 pinv(0) => pinv(0) different from
Matlab

    _______________________________________________________

Follow-up Comment #2:

Leaving aside what Matlab does for the moment, what would you like to see for
the inverse of a scalar?

In general, the inverse would just be 1/x for a scalar.  So,


pinv (5)
ans =  0.20000


If I follow this analogy, pinv(0) should return 1/0


octave:2> 1/0
warning: division by zero
ans = Inf


which is what the function seems to be doing.

Of course, maybe it is better to be Matlab compatible for this case.  Or maybe
pinv should follow inv.  


octave:5> inv (0)
warning: matrix singular to machine precision
ans = 0


There is definitely room for interpretation here, rather than being absolutely
the wrong answer.  Maybe you should post on the Octave Maintainer's list to
gather some other opinions.



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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