Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Warning Message wrt NMinimize function

  • To: mathgroup at
  • Subject: [mg69746] Re: [mg69731] Warning Message wrt NMinimize function
  • From: "Chris Chiasson" <chris at>
  • Date: Fri, 22 Sep 2006 01:04:15 -0400 (EDT)
  • References: <>

Maybe you should provide the expression for aa, bb, and n. Also, in
regular least squares curve fitting, there is no restriction on the
parameter space (no restriction on y).



bb=Table[y Random[],{20}]

{0.227101 y,0.239582 y,0.0272011 y,0.286646 y,0.923335 y,0.0898122 y,
  0.801797 y,0.187167 y,0.565142 y,0.952195 y,0.496352 y,0.16751 y,0.147113 y,
  0.56533 y,0.0800794 y,0.675084 y,0.939346 y,0.0790994 y,0.653634 y,
  0.304583 y}



On 9/21/06, John Adeosun <jtadeosun at> wrote:
> Hello Everyone,
> I want to use NMinimize to solve an optimization problem. In essence, I'm
> trying to numerically minimize the "sum of a square of errors" for two
> lists, aa and bb (earlier generated lists of n elements or points), using
> the below syntax:
>  NMinimize[{Plus @@ Table[(aa[[i]] - bb[[i]])^2, {i, n}], {y> 0}}, y,
> Method -> "DifferentialEvolution"]
> This does not yield the intended result of, say, {minimumvalue, y->10.012}.
> I have been getting an expression (unevaluated "result" ) with a warning
> message such as:
> NMinimize::nnum : The function value {336.381} is not a number at {y}=
> {0.063703}. More...
> I then clicked on 'More' for help. I got the below message from the help
> browser:
> "General::nnum
> function::nnum: The function value `3` is not a number at `2` = `1`.
> Notes for this message have not yet been added."
> Has anyone experienced this before? Is anything wrong with my syntax above?
> Thanks in advance for your useful insight.
> John.


  • Prev by Date: Re: does the following code shut down anyone else's kernel? - why?
  • Next by Date: Re: webMathematica, Packages, and
  • Previous by thread: Warning Message wrt NMinimize function
  • Next by thread: Re: Warning Message wrt NMinimize function