help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave inputParser


From: Carnë Draug
Subject: Re: Octave inputParser
Date: Fri, 20 Apr 2012 11:30:51 +0100

On 20 April 2012 10:53, Aki Vehtari <address@hidden> wrote:
> Thanks for the informative reply. Unfortunately I don't have time and
> competence to fix octave-core bug #34478 or implement classdef.

As Jordi as already mentioned, there's also the possibility of paying
someone to fix it for you (not unlike one would pay a plumber to fix
his house). I won't be able to do such thing but certainly someone on
the mailing list would.

>> The code you're asking for is in the general package release (1.3.0
>> released less than 1 month ago).
>
> I have downloaded this code and experimented with it. I think I can manage
> with the current octave API for inputParser, but there is one bug and
> missing functionality in the 1.3.0 relase of inputParser.
>
> 1) Leaving out optional arguments does not work. Below is example function
> and example function calls, where latter fails in Octave, but not in Matlab.

How does it succeed in Matlab? This does not make sense. How can you
skip the optional parameters and jump into param/value? How can one
know if it's an optional parameter that does not validate or the key
for a parameter? I have no matlab access to experiment, I had to
deduce from their documentation. I asumed matlab would work this way
as I don't understand how it can be otherwise and this is documented
"see help inputParser"

## @emph{Note 2}: if both @command{Optional} and @command{ParamValue} arguments
## are mixed in a function API, the user will have to specify @emph{all}
## @command{Optional} arguments before the @command{ParamValue} and
## @command{Switch}arguments.

> 2) Matlab's inputParser accepts parameter-value pairs as a struct. It seems
> that this is not yet implemented in the 1.3.0 relase of inputParser.
>
> We might be able to fix these, but before spending time on that, I'd like to
> know if someone has already fixed these or working on these?

As far as I know, no one is working on this at the moment. I know it's
not implemented but shouldn't be too hard to do it. The StructExpand
proprierty is already in place, it just doesn't do anything. When you
fix this, please do not forget to send us back a patch. Thanks in
advance.

By the way, if you are using octave's inputParser, take a look at
addSwitch which matlab hasn't implemented yet.

Carnë


reply via email to

[Prev in Thread] Current Thread [Next in Thread]