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

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

[Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty s


From: Marco Caliari
Subject: [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix.
Date: Wed, 8 May 2019 08:19:09 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

Follow-up Comment #34, bug #56232 (project octave):

For a sparse singular matrix, it is not clear to me what matlab does:


>> inv(sparse([1,0;1,0]))
Warning: Matrix is singular to working precision. 

ans =

   (1,1)        1
   (2,1)     -Inf
   (2,2)      Inf
>> inv(sparse([1,2;0,0]))
Warning: Matrix is singular to working precision. 

ans =

   (1,1)      NaN
   (2,1)      NaN
   (1,2)     -Inf
   (2,2)      Inf


For the same examples, in the full form, matlab gives a matrix of Inf. The
same does octave. I would suggest that octave gives a sparse matrix of Inf.
There are five cases in which tinverse gives the division by zero error. It
should be enough to modify them in such a way that a sparse matrix of Inf is
returned.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56232>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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