patchGNU Octave - Patches: patch #7712, Make menu.m More Compatible with...

 
 

patch #7712: Make menu.m More Compatible with MATLAB

Submitter:  RPS <ryanst>
Submitted:  Wed 01 Feb 2012 07:42:48 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  jordigh Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 28 Mar 2012 03:47:13 PM UTC, comment #7: 

Thanks, I've pushed your patch on the default branch:

http://hg.savannah.gnu.org/hgweb/octave/rev/ff4143d9fc05

It will be part of the 3.8 release or whatever the next major release after 3.6.1 is.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Wed 28 Mar 2012 12:45:49 AM UTC, comment #6: 

I am have attached the revised menu.diff file and have rewritten it in Octave style.  Let me know if there are any questions.

I can be credited as Ryan Starret (brannigan@starret.ca).

(file #25486)

RPS <ryanst>
Thu 22 Mar 2012 04:35:46 PM UTC, comment #5: 

I still intend to make the requested modifications. I will have this done by 28MAR2012. 

Apologies for the delay - I'm in the middle of a home reno and haven't been tinkering with the computer much.

RPS <ryanst>
Thu 22 Mar 2012 03:57:41 PM UTC, comment #4: 

Ping. I suppose you lost interest? I would like to at least know how to credit you.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Fri 17 Feb 2012 02:13:56 AM UTC, comment #3: 

Sorry to trouble you, but could you please rewrite this in Octave style?

1) There has to be a space before an opening parens if it's a function call, but not if it's indexing

2) Use descriptive loop-closing keywords (endif, endfor, endwhile).

3) Use ! instead of ~ for negation

4) Put parens around conditions in loops, e.g. if (foo==bar), not if foo == bar

Also, how would you like to be credited? Normally we do "Real Name <some.email>"

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Wed 01 Feb 2012 08:10:28 PM UTC, comment #2: 

I did the diff based on menu.m in the Octave 3.4.3 sources and code I wrote to mimick the functionality in Matlab (I assumed this would be understood).

RPS <ryanst>
Wed 01 Feb 2012 07:52:19 PM UTC, comment #1: 


> The attached patch is based on the latest version of
> menu.m found in the sources.


Which sources?

Did you read Matlab source code in order to implement this? If so, we can't use it. It's legally risky to include code in Octave obtained by reading Matlab source code, even if you think you made it look different.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Wed 01 Feb 2012 07:42:48 PM UTC, original submission:  

Octave's current menu.m does not accept cell array input for the input choices.  The attached patch adds this functionality.

The patch makes menu.m less restrictive input-wise than MATLAB's, however any code written in MATALB should now work with the new version of menu.m.  For example, in MATLAB, two cell arrays of cell arrays provided as input to menu.m will fail, however this patch accepts these arguments without issue.

The attached patch is based on the latest version of menu.m found in the sources.

RPS <ryanst>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #25486:  menu.diff added by ryanst (933B - application/octet-stream - Revised diff for menu.m)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by ryanst (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 logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-03-28 jordigh StatusIn Progress Done
        Open/ClosedOpen Closed
    2012-03-28 ryanst Attached File- Added menu.diff, #25486
    2012-02-17 jordigh StatusNone In Progress
    2012-02-17 jordigh Assigned toNone jordigh
    2012-02-01 ryanst Attached File- Added menu.diff, #24953

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code