[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: Nonlinear Equation Solve

**From**: |
Olaf Till |

**Subject**: |
Re: Nonlinear Equation Solve |

**Date**: |
Wed, 15 Feb 2012 10:14:24 +0100 |

**User-agent**: |
Mutt/1.5.20 (2009-06-14) |

On Tue, Feb 14, 2012 at 03:46:40PM -0800, Thomas D. Dean wrote:
>* On 02/14/12 15:37, Dmitri A. Sergatskov wrote:*
>* > f = @(x)sin(x)+3;*
>* >x = fminunc(f,4, optimset("TolX",10*eps,"TolFun",10*eps,"ComplexEqn","on"))*
>* *
>* Yes, it works for that application.*
>* *
>* *
>* octave:73> f = @(x)sin(x)+3;*
>* octave:74> x = fminunc(f,4,*
>* optimset("TolX",10*eps,"TolFun",10*eps,"ComplexEqn","on"))*
>* x = 4.7124*
>* *
>* *
>* Tom Dean*
In your original example you used fminunc with a function that returns
a non-scalar? This won't work, fminunc expects a scalar-valued
objective function.
If the advice you got solved the problem with fsolve, everything
should be o.k. ...
BTW fminunc does not support the option 'ComplexEqn'.
--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

**
**`signature.asc`

*Description:* Digital signature