octave-maintainers
[Top][All Lists]
Advanced

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

Re: fmincon wrapping nonlin_min


From: Olaf Till
Subject: Re: fmincon wrapping nonlin_min
Date: Wed, 1 Jul 2015 09:12:08 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jul 01, 2015 at 04:06:44AM +0100, Asma Afzal wrote:
> Hi Olaf,
> 
> Thank you for your detailed response.
> 
> One more observation that I want your advice about:
> 
> - Any zero value in initial guess vector for nonin_residmin/
> nonlin_min gives an error. Example:
> 
> k = 1:10;
> func = @(x) 2 + 2 * k - exp (k * x(1)) - exp (k * x(2));
> x0 = [0;0.5];
> x = nonlin_residmin(func,x0)
> 
> warning: division by zero
> warning: called from
>     __dfdp__ at line 367 column 21
>     __nonlin_residmin__> at line -1 column -1
>     __lm_svd__ at line 191 column 9
>     __nonlin_residmin__ at line 1125 column 21
>     nonlin_residmin at line 98 column 21
>     runlsqnonlin at line 9 column 3
> error: svd: cannot take SVD of matrix containing Inf or NaN values

This was due to my changes for TypicalX, disregarding that
sign(0)==0. Fixed now in central repository.

> Matlab gives
> 
> x =
> 
>     0.2578
>     0.2578

nonlin_residmin with default options returns:

x =

   0.25699
   0.26171

with 'sumsq (func (x))' greater than for x = [0.2578; 0.2578].

So Matlab performs better in this example if default options are
used. It's probably worth changing this, since it's a simple example
function. You'll probably change some default values of options in
wrapping. If you find options ('TolFun', 'TypicalX', ...) for which
nonlin_residmint performs better for this example, please tell me.

Regards,

Olaf

(PS: You seemingly forgot to CC the maintainers list.)

-- 
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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