MathGroup Archive 2007

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

Search the Archive

Re: minimum of a function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75050] Re: minimum of a function
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Sun, 15 Apr 2007 05:12:42 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <evpoqm$6cp$1@smc.vnet.net>

Sven Krueger wrote:
> Hi
> 
> I also have a question concerning a mathematica problem:
> 
> I search the minimum of a function
> fmin := FindMinimum[f[x], {x, 0}]
> Evaluate[fmin]
> 
> I get out for example
> {2.4, {x -> 0.2}}
> 
> Is it possible to use the result x=0.2 afterwards?
> I would like to fix x after getting out the value of x at different
> results of fmin.
> 
> Thank you for your help
> 
> Sven Krüger
> 
> 

In[1]:=
sol = {2.4, {x -> 0.2}}

Out[1]=
{2.4, {x -> 0.2}}

The solution for x is returned as a transformation rule. You can use the 
replacement operator /. to apply the rule. See [1] for detailed information.

In[2]:=
x /. sol[[2]]

Out[2]=
0.2

In[3]:=
xmin = x /. sol[[2]]

Out[3]=
0.2

Regards,
Jean-Marc

[1] _The Mathematica Book_, "1.4.2 Values for Symbols", 
http://documents.wolfram.com/mathematica/book/section-1.4.2


  • Prev by Date: Re: Spurious Line
  • Next by Date: Re: Mathematica help
  • Previous by thread: Re: minimum of a function
  • Next by thread: Re: minimum of a function