bugGNU Octave - Bugs: bug #46737, condest function returns incorrect...

 
 

bug #46737: condest function returns incorrect result for singular matrix

Submitter:  Bill Greene <billgreene>
Submitted:  Mon 21 Dec 2015 02:58:57 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 15 Aug 2018 07:22:16 PM UTC, comment #2: 

I overhauled condest.m in this changeset https://hg.savannah.gnu.org/hgweb/octave/rev/4e4ffcca8b5d.

It now detects singular matrices and returns Inf which was the bug report here.  I also improved input validation and stopped printing warnings about singular matrices during the computation of intermediate results.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Mon 21 Dec 2015 04:01:21 PM UTC, comment #1: 

Here the problem is the solution of singular systems (try simply C\ones(3,1) for e=0). In Octave you get the least square solution, in Matlab you get the inf. Once U is computed, we should check
whether it is singular


if (any (diag (U) == 0))
  est = Inf;
  return
endif


Not clear how the second output argument is computed in Matlab in this case.

Marco

Marco Caliari <caliari>
Group Member
Mon 21 Dec 2015 02:58:57 PM UTC, original submission:  

It returns a very small number rather than Inf (or at least
a large number comparable to 1/eps). It is easy to reproduce but
a simple example is attached.

Bill Greene <billgreene>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #35820:  condestTest.m added by billgreene (271B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by caliari (Posted a comment)
  • -email is unavailable- added by billgreene (Submitted the item)
  • -email is unavailable- added by billgreene
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-15 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
        Release4.0.0 dev
        Operating SystemMicrosoft Windows Any
    2015-12-21 billgreene Attached File- Added condestTest.m, #35820
        Carbon-Copy- Added billgreene

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code