bugGNU Octave - Bugs: bug #56903, Implementation of namedargs2cell

 
 

bug #56903: Implementation of namedargs2cell

Submitter:  Guillaume <gyom>
Submitted:  Mon 16 Sep 2019 01:46:03 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 18 Sep 2019 04:43:08 AM UTC, comment #1: 

I bet Matlab ends up changing the name of this function within a few years.  At any rate, I added it to Octave in this changeset (https://hg.savannah.gnu.org/hgweb/octave/rev/3ec072ab1bda).  Your implementation was good.  I benchmarked an alternative but it was a few percent slower.  I also added an entry in the NEWS file announcing the function, added it to the Octave manual near struct2cell(), and added a seealso link from struct2cell to the new function.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Mon 16 Sep 2019 01:46:03 PM UTC, original submission:  

There is a new utility function in Matlab called namedargs2cell to convert a scalar structure into a list of name/value pairs (as a row cell array):
https://www.mathworks.com/help/matlab/ref/namedargs2cell.html
I attach a possible implementation.

Guillaume <gyom>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #47528:  namedargs2cell.m added by gyom (2KiB - text/x-matlab)

 

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 gyom (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-09-18 rik5 Open/ClosedOpen Closed
    2019-09-18 rik5 StatusNone Fixed
    2019-09-16 gyom Attached File- Added namedargs2cell.m, #47528

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code