[Top][All Lists]

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

Re: optimset & setfield

From: Nathan Weisz
Subject: Re: optimset & setfield
Date: Tue, 30 Sep 2003 17:56:04 +0200

Hi Etienne,

thanks for the quick response.
I should add : good luck!

I can imagine the large grin on your face :-)
Will need a holiday if I'll ever manage to get this stuff running.

1) optimset() of matlab and optimset() of octave-forge only have a
superficial resemblance.
2) You'd better use the whole octave-forge package (not just
optimset). It already has setfield().

Followed your advice and downloaded the entire octave-forge package.
However I do still have some problems on a very basic level. The optimset-call from Hansens program is:
where s, beta and xi are matrices.

Now I get following error:
error: setfield: called with odd number of arguments

Looking at your optimset-code it says on line 44:
opt = setfield ();
This probably is interpreted as nargin = 0.
rem(0,2) --> ans = 0

In setfield.m stands:
if rem(nargin,2) != 1,
error('setfield: called with odd number of arguments\n') ;

So I am wondering whether line 44 of optimset can be correct (regardless of Matlab-compatibility), or whether I'm simply using it in a wrong fashion.

All the best,

reply via email to

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