|
From: | Chris |
Subject: | Re: Package Contribution Procedure and Best Way to Interpret Name, Value Arguments? |
Date: | Sun, 1 Jan 2017 14:34:39 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
On 01/01/17 11:09, Juan Pablo Carbajal wrote:
On Sat, Dec 31, 2016 at 5:43 PM, PhilipNienhuis <address@hidden> wrote:Question 2) Now that statelevels exists, I can write dutycycle. This function will have a few *Name,Value* variable arguments. Is there a standard way to interpret these?There's the inputparser class in core Octave. I've never used it but I think it can do the job.It depends on the maximum number of expected arguments. If you plan to have a lot of configurable options, then I strongly suggest InputParser to keep the code clean (it also handles default values and input validation). If you are thinking of just a few options (one, two?) then do the switch or if block.
Thank you. I'll check it out.In regards to development of high level functions. I think it would be good to have a list of instructions for people who want to submit a function. Including how to test, how to make a changeset etc.
This would achieve two things1) People who are very capable of writing high level functions might have never used version management. - I'm thinking about the scientists I work with.
2) This might streamline the process for including new functions. What do you think? I'm happy to write a wiki article if appropriate. I'm new here but I am really keen to help the octave project. B/W, Chris
[Prev in Thread] | Current Thread | [Next in Thread] |