help-octave
[Top][All Lists]
Advanced

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

Re: named arguments


From: Michael Goffioul
Subject: Re: named arguments
Date: Fri, 16 Mar 2012 16:43:58 +0000

On Fri, Mar 16, 2012 at 4:39 PM, John W. Eaton <address@hidden> wrote:
> On 16-Mar-2012, Jordi Gutiérrez Hermoso wrote:
>
> | Really? How? Without futzing around with varargin and testing for
> | string equality?
>
> Yes, you have to use varargin and look for strings.
>
> You could also use an option structure.

Use parseparams to extract key/value pairs, then struct to make a
structure for easy by-name access to variables. Not as easy as
python-way, but probably close enough.

Michael.


reply via email to

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