bugGNU Octave - Bugs: bug #48523, 3d meshgrid incorrect

 
 

bug #48523: 3d meshgrid incorrect

Submitted by:  Muhali <muhali>
Submitted on:  Fri 15 Jul 2016 04:06:18 PM UTC  
 
Category: Octave FunctionSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 13 Sep 2017 04:21:20 AM UTC, comment #4:

@Markus: Finally got around to reviewing and pushing your patch here http://hg.savannah.gnu.org/hgweb/octave/rev/631076eab47b. Thanks for the work, and sorry no one noticed this easy fix earlier.

Rik <rik5>
Project Administrator
Mon 19 Dec 2016 05:34:25 PM UTC, comment #3:

Can this patch be considered for pushing?

It looks like I accidently uploaded the same file twice. They are both identical.

Markus Mützel <mmuetzel>
Project Member
Tue 26 Jul 2016 02:05:31 PM UTC, comment #2:

Attached please find the trivial fix. It also adds a test for the case from comment #0.

In contrast to Matlab, Octave allows nargin==2 with nargout==3. This adds functionality and imho does not break compatibilty. I documented this specific case. OK?

(file #38030)

Markus Mützel <mmuetzel>
Project Member
Fri 15 Jul 2016 04:18:08 PM UTC, comment #1:

Thanks. This should be an easy fix in the meshgrid.m file.

This does work if nargout == 3, but Octave is using nargout to determine whether the space should be 2 or 3 dimensions and ignoring the 3rd input argument if nargout < 3.

If nargin == 1, then the results should still be based on nargout as it is done currently, but if nargin > 1 then the output should probably be derived from that.

Mike Miller <mtmiller>
Project Administrator
Fri 15 Jul 2016 04:06:18 PM UTC, original submission:

incorrectly produces

ans =

3 2

whereas the correct should be (as in ML)

ans =

3 2 5

Muhali <muhali>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #38045:  bug48523_meshgrid.patch added by mmuetzel (2KiB - text/x-diff)
file #38030:  bug48523_meshgrid.patch added by mmuetzel (2KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mmuetzel (Updated the item)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by muhali (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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 13 Sep 2017 04:21:20 AM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Mon 19 Dec 2016 05:34:25 PM UTCmmuetzelStatusConfirmed=>Patch Submitted
    Thu 28 Jul 2016 06:17:25 PM UTCmmuetzelAttached File-=>Added bug48523_meshgrid.patch, #38045
    Tue 26 Jul 2016 02:05:31 PM UTCmmuetzelAttached File-=>Added bug48523_meshgrid.patch, #38030
    Fri 15 Jul 2016 04:18:08 PM UTCmtmillerSeverity3 - Normal=>2 - Minor
      Item GroupNone=>Matlab Compatibility
      StatusNone=>Confirmed
      Release4.0.2=>dev
      Operating SystemGNU/Linux=>Any

    Back to the top


    Powered by Savane 3.1-cleanup1