Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

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[1]:=
FindMinimum[Sin[x], {x, 1}]
Out[1]=
{-1., {x -> -1.5708}}
In[2]:=
x = x /. x -> -1.5708
Out[2]=
-1.5708

Now x has the value you want:

In[3]:=
x
Out[3]=
-1.5708

Alternatively:

In[4]:=
FindMinimum[Sin[x], {x, 1}][[2, 1, 2]]
Out[4]=
-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[[1]] - splinespec[u]).(neupunkte[[1]] -
>           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 !?