bugGNU Octave - Bugs: bug #38686, ndgrid(1:3) should return a vector

 
 

bug #38686: ndgrid(1:3) should return a vector

Submitter:  Julien Bect <jbect>
Submitted:  Mon 08 Apr 2013 08:16:12 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
   

Fri 17 May 2013 06:00:50 PM UTC, comment #2: 
John W. Eaton <jwe>
Group administrator
Sat 11 May 2013 10:02:14 AM UTC, comment #1: 

To me it looks like the ndgrid implementation imitates meshgrid. Mathworks documentation is consistent with the behavior observed by the OP. Patch attached.

(file #28065)

Clemens Buchacher <drizzd>
Mon 08 Apr 2013 08:16:12 PM UTC, original submission:  

ndgrid with a single vector argument should return a vector.

Here is what I get with Matlab R2012a:


>> ndgrid(1:3)

ans =

     1
     2
     3


Here is what I get with Octave 3.7.2+:


octave:1> ndgrid(1:3)
ans =

   1   1   1
   2   2   2
   3   3   3


Julien Bect <jbect>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #28065:  ndgrid-1d.patch added by drizzd (1KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by jordigh (Updated the item)
  • -email is unavailable- added by drizzd (Updated the item)
  • -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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-05-17 jwe StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2013-05-11 jordigh StatusNone Patch Submitted
    2013-05-11 drizzd Attached File- Added ndgrid-1d.patch, #28065

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code