bugGNU Octave - Bugs: bug #57003, rats() does not convert N-d arrays...

 
 

bug #57003: rats() does not convert N-d arrays to 2-D arrys before conversion

Submitter:  Rik <rik5>
Submitted:  Sat 05 Oct 2019 08:41:41 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  rik5
Originator Name:  Open/Closed:  * Closed
Release:  * dev Release: 
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 05 Oct 2019 08:53:32 PM UTC, comment #1: 

Fixed in this changeset https://hg.savannah.gnu.org/hgweb/octave/rev/b8b1bf5b2bbf.

Closing report.

Rik <rik5>
Group administrator
Sat 05 Oct 2019 08:41:41 PM UTC, original submission:  

Matlab collapses N-d arrays to 2-D arrays before conversion.

Sample code:


octave:1> x = hilb (3);
octave:2> x(:,:,2) = 2*x;
octave:3> s = rats (x, 9)
s =

ans(:,:,1) =

          1        1/2        1/3
        1/2        1/3        1/4
        1/3        1/4        1/5

ans(:,:,2) =

          2          1        2/3
          1        2/3        1/2
        2/3        1/2        2/5


The Matlab answer is just the contents of the matrix without other verbiage like "ans(:,:,1) =".

Rik <rik5>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Submitted the item)
  •  

    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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-10-05 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code