octave-maintainers
[Top][All Lists]
Advanced

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

Re: fsolve test failure


From: Jaroslav Hajek
Subject: Re: fsolve test failure
Date: Thu, 29 Jan 2009 21:47:10 +0100

On Thu, Jan 29, 2009 at 9:24 PM, John W. Eaton <address@hidden> wrote:
> On 29-Jan-2009, Jaroslav Hajek wrote:
>
> | On Thu, Jan 29, 2009 at 8:57 PM, John W. Eaton <address@hidden> wrote:
> | > On 28-Jan-2009, Jaroslav Hajek wrote:
> | >
> | > | PS. I'll also commit the patch to make optimset/optimget case 
> insensitive.
> | >
> | > OK.
> | >
> |
> | I slightly hesitated with this - what, in your opinion, is the better
> | way to proceed?
> |
> | 1. let both optimset & optimget convert their args to lowercase.
> | 2. leave optimset untouched, and write optimget in such a way that the
> | query is case-insensitive.
> |
> | 1. is easier and faster, because 2. probably requires looping through
> | the fields, but does not preserve case of options set.
>
> I don't think that Matlab preserves the case of the options set, but
> you do have to be able to set and query in a case insensitive way.
>
>
> I think it always uses "TolX".  But unless it is expected that users
> will access the fields directory with struct indexing operations
> then I don't see why the internal names have to use StudlyCaps.

OK.

> But if it is necessary to be able to do things like
>
>  opts = optimget ();
>  opts.TolX = foobar;
>

>  fsolve (..., opts);
>
> (and I guess I would expect there to be some code out there that works
> this way) then I guess we are stuck with the exact names they choose.
>
> jwe
>

I think the options should only be accessed via optimget/optimset, so
we don't need to support code like the above. Fix is trivial, after
all.

cheers

-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

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