[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: optim package question
From: |
Olaf Till |
Subject: |
Re: optim package question |
Date: |
Mon, 1 Jul 2019 22:36:15 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Sun, Jun 30, 2019 at 03:26:47PM +0000, Tso-min Chou wrote:
> Hi Olaf,
> Thanks for the information. I looked at the optim_doc and it seems I
> can still use both optimset and lsqnonlin in Octave as in
> Matlab. But when I ran the code the error message points the issue
> is in function lsqnonlin. error: Invalid call to lsqnonlin.
> Correct usage is: -- Function File: lsqnonlin (FUN, X0) -- Function
> File: lsqnonlin (FUN, X0, LB, UB) -- Function File: lsqnonlin (FUN,
> X0, LB, UB, OPTIONS) -- Function File: [X, RESNORM, RESIDUAL,
> EXITFLAG, OUTPUT, LAMBDA, JACOBIAN] = lsqnonlin (...)error:
> called from print_usage at line 91 column 5 lsqnonlin at line
> 184 column 5 Octave_ECP_optim at line 234 column 64 >From the
> original code [XOut,ErrorTotal,ErrorPartial] =
> lsqnonlin('FETProcess_mod2a_Shuoqi',XGuess,XMin,XMax,options,Freq,SMeas,Scale)
>
> I am not sure where I did run to call the function it looks correct to me.
> Best Regards,
> TsoMin
lsqnonlin in optim accepts only 5 arguments, so your 'Freq', 'SMeas',
and 'Scale' are two much for it. I don't find anything in Matlabs
lsqnonlin documentation saying that more than 5 arguments are
accepted. Can you give me a pointer to such information?
Also, it seems that lsqnonlin accepts only a function handle as the
first argument, not a name of a function. This is a bug (which can be
easily fixed, I'll do this soon), since according to Matlab
documentation a name of a function should be accepted, too.
Olaf
PS: At our mailing list it is regarded as good pratice to place
answers below the issue which is answerd (no 'top posting' --- see
https://en.wikipedia.org/wiki/Posting_style). It makes discussions
more readable.
And please keep the mailing list in CC.
--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: optim package question,
Olaf Till <=