bugGNU Octave - Bugs: bug #43875, warning: matrix singular to...

 
 

bug #43875: warning: matrix singular to machine precision for triangular matrices

Submitted by:  Marco Caliari <caliari>
Submitted on:  Tue 23 Dec 2014 01:55:50 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.8.1Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 28 Jan 2015 09:55:01 AM UTC, comment #5:

Matlab prints the warning for every left division with A. The trivial case 0 \ 1 always prints the warning "division by zero" in Octave and never in Matlab. I vote for always printing the warning.

Marco Caliari <caliari>
Project Member
Tue 27 Jan 2015 02:46:41 PM UTC, comment #4:

Yes, initially the matrix type is "Full" but after the first pass through Matrix::fsolve it is set to "Rectangular". From then on, the logic in Matrix::solve dispatches directly to lssolve instead of first going through Matrix::fsolve. Should we do something different there?

John W. Eaton <jwe>
Project Administrator
Fri 02 Jan 2015 05:32:02 PM UTC, comment #3:

Seems to work, although there is one oddity. The warning about the matrix being singular is printed out just once for the initial matrix A. Subsequent left divisions do not produce another warning. On the other hand, every left division of the U matrix produces a warning. This is probably something to do with the matrix type caching.

Rik <rik5>
Project Administrator
Sun 28 Dec 2014 02:41:21 AM UTC, comment #2:

I pushed my proposed change here:

http://hg.savannah.gnu.org/hgweb/octave/rev/aee5fea8a03e

John W. Eaton <jwe>
Project Administrator
Fri 26 Dec 2014 07:37:05 PM UTC, comment #1:

I think the attachec patch should solve this problem. I'm not sure why calc_cond was set to false for these function calls but not the normal full solver.

(file #32718)

John W. Eaton <jwe>
Project Administrator
Tue 23 Dec 2014 01:55:50 PM UTC, original submission:

Dear all,

if I try to solve the system

I get the warning about the singularity of the matrix (rcond = 1.54e-18). If I take the U of its LU factorization [L, U] = lu(A) and the same rhs, I get no warning, although rcond (U) = 2.59e-18.
Is this desired? Matlab gives the warning in both cases.

Cheers,

Marco

Marco Caliari <caliari>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #32718:  diffs.txt added by jwe (4KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by jwe (Updated the item)
  • -unavailable- added by caliari (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 27 Jan 2015 06:34:04 AM UTCrik5StatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Tue 30 Dec 2014 10:06:33 PM UTCrik5StatusNone=>Ready For Test
    Fri 26 Dec 2014 07:37:05 PM UTCjweAttached File-=>Added diffs.txt, #32718

    Back to the top


    Powered by Savane 3.1-cleanup1