       Re: Select Output of FindMinimum

• To: mathgroup at smc.vnet.net
• Subject: [mg25708] Re: [mg25658] Select Output of FindMinimum
• From: Tomas Garza <tgarza01 at prodigy.net.mx>
• Date: Thu, 19 Oct 2000 04:35:33 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```FindMinimum returns a list of the form {fmin, {x->xmin}}, where fmin is
the minimum value of f found, and xmin is the value of x for which it is
found (Help Browser). The only thing is that xmin is given in the form
of a "rule". So, if you want to extract the value of xmin, proceed as in
the following example:

In:=
FindMinimum[Sin[x], {x, 1}]
Out=
{-1., {x -> -1.5708}}
In:=
x = x /. x -> -1.5708
Out=
-1.5708

Now x has the value you want:

In:=
x
Out=
-1.5708

Alternatively:

In:=
FindMinimum[Sin[x], {x, 1}][[2, 1, 2]]
Out=
-1.5708

To see why, look at FullForm.

Tomas Garza
Mexico City

"Philipp Gunz" <gunz at treangeli.at> wrote:

> Im having troubles selecting the output of the FindMinimum-Function:
>
> minimize =
>   FindMinimum[(neupunkte[] - splinespec[u]).(neupunkte[] -
>           splinespec[u]), {u, 0.0001, splinespec[[2, 2]]}, Compiled ->
True]
>
> OUT: {0.00138329, {u -> 1.88935}}
>
> What I need for further calculations is the value of u ... and I
don't know
> how to extract that information.

```

• Prev by Date: Re: Select Output of FindMinimum
• Next by Date: Re: Mathematica -> "AI"
• Previous by thread: Re: Select Output of FindMinimum
• Next by thread: Bugs in Abs and Sign !?