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: Sat, 31 Jan 2009 06:46:00 +0100

On Fri, Jan 30, 2009 at 9:50 PM, John W. Eaton <address@hidden> wrote:
> On 30-Jan-2009, Jaroslav Hajek wrote:
>
> | Technically, there is no incompatibility.
>
> I'd say, that technically there is, because optimset returns different
> things.  But in practice, I agree that you are right that this
> probably won't matter.  I seem to keep forgetting that even though
> Octave's optimset returns an empty structure, you can add fields to
> it.  So if someone has done this in some Matlab code, it will stil
> work with Octave.  It only matters if someone calls optimset and
> expects to see a get a non-empty structure and then wants to do
> something with those fields.  I guess this won't happen often.
>
> | a field directly, and if you use invalid case, the field will be
> | silently ignored. We can only try to be smarter than Matlab, and, for
> | instance, check for the condition in optimget, but I think we should
> | discourage direct manipulation of the struct anyway.
>
> Yes, I agree.
>
> | __all_opts__ ('optimfunc')
> |
> | will call optimfunc('defaults') and then add all the options.
>
> OK.  Should this be done with a function handle?  Maybe it doesn't
> matter.
>
> | > Maybe instead of including the initial list directly in
> | > fzero, fsolve lsqnonneg, these should also be added using PKG_ADD?
> | > Then each of these functions would not have special treatment, and the
> | > PKG_ADD line in each of them would serve as an example of how to
> | > properly add an optimization function to the list.
> |
> | That's a good idea. I forgot Octave can have its own PKG_ADD commands.
> | This also simplifies the function nicely. So, right now,
> | optimization/PKG_ADD contains
> | __all_opts__ ("fzero", "fsolve", "lsqnonneg");
> | which registers all their options.
>
> Instead of creating the PKG_ADD file by hand, you should add
>
>  ## PKG_ADD: __all_opts__ ("fsolve");
>
> to each file that needs to do something like this.  That way if
> someone later adds a PKG_ADD directive to some other file in the
> optimization directory, you won't lose the contents of your
> hand-edited PKG_ADD file.  I made this change and removed the PKG_ADD
> file from the source tree.
>

Thanks. It seems I owe myself a bit of reading the docs here.

-- 
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]