bugGNU Octave - Bugs: bug #38685, ndgrid([]) should return an empty...

 
 

bug #38685: ndgrid([]) should return an empty matrix

Submitter:  Julien Bect <jbect>
Submitted:  Mon 08 Apr 2013 08:07:59 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Julien Bect Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 19 Jun 2013 11:54:25 PM UTC, comment #1: 

I fixed the handling of empty inputs with this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/e205f5ea826a).  You will need to use the development sources in order to see the fix or wait for the 3.8 release.

Rik <rik5>
Group administrator
Mon 08 Apr 2013 08:07:59 PM UTC, original submission:  

ndgrid() fails if one of its arguments is empty. For matlab compatibility, it should return an empty matrix instead.

Here is what I get with Matlab R2012a:


>> x = ndgrid([]); whos x
  Name      Size            Bytes  Class     Attributes

  x         0x1                 0  double

>> [x, y] = ndgrid([], []); whos x y
  Name      Size            Bytes  Class     Attributes

  x         0x0                 0  double
  y         0x0                 0  double


Julien Bect <jbect>

 

(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 (Posted a comment)
  • -email is unavailable- added by jbect (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
    2013-06-19 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code