MathGroup Archive 2004

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

Search the Archive

Re: Using a Result from NMinimize

  • To: mathgroup at
  • Subject: [mg49376] Re: Using a Result from NMinimize
  • From: "Curt Fischer" <crf3 at>
  • Date: Sat, 17 Jul 2004 06:38:39 -0400 (EDT)
  • References: <cd8atu$ok5$>
  • Sender: owner-wri-mathgroup at

Gregory Lypny wrote:
> Hello Everyone,
> When I use NMinimize, it gives the result as the minimum value of the
> function and the value of the argument that gets us there, for
> example,
> {0.0817747, {rp -> 0.0920851}}.
> How can I access the second element, that is, the value of the
> argument, so that I can use in other computations.  In other words, I
> want get at 0.0920851 and strip away the rp ->.

NMinimum returns a list, where the first element is the minimum, and the
second element is a replacement rule for the argument at which the minimum
occurs.  You want to invoke the replacement rule, which is the second part
of the list.  Here's how to do it

minimum=NMinimize[4x^2  - 16x + Exp[Sin[x]],x]




Curt Fischer

  • Prev by Date: newbie alert: FindRoot
  • Next by Date: AW: Using a Result from NMinimize
  • Previous by thread: Re: Using a Result from NMinimize
  • Next by thread: RE: Using a Result from NMinimize