MathGroup Archive 1997

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

Search the Archive

Re: A quick question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg7825] Re: A quick question
  • From: Tony.Nicolas at insa-rouen.fr (Tony NICOLAS)
  • Date: Mon, 14 Jul 1997 03:01:09 -0400
  • Organization: INSA-LMR
  • Sender: owner-wri-mathgroup at wolfram.com

In article <5pv1q6$ig1 at smc.vnet.net>, Chen-Ying Huang
<huang3 at fas.harvard.edu> wrote:

> Hi there:
>   I am a grad student and I am using Mathematica to solve an
> international trade model. My question is that since I need to do some
> nonlinear optimization, so I used the command "FindMinimum". The problem
> is that Mathematica reported it without assigning the value to the
> variable. For example, say if I want to FindMinimum of the function
> f=x^2, then the result I get is {0,{x->0}. But that is not enough for me
> since I want the value 0 to be restored in x, that is I want to have 0
> assigned to the variable x after I run the command "FindMinimum" because
> I need to use this value of x to do more calculations. Since I need to
> repeat this in a loop, I cannot do it manually. Is there someone who can
> help me with this? I really appreciate any help and please give me
> answers as soon as possible. I really need to do this, otherwise my
> advisor will think that I am just shirking.
>    Thank you, whoever you are!
> Chen-Ying Huang
> e-mail: chuang at kuznets.fas.harvard.edu

Evrey object in Mathematica is a list. So if you want give the value of x,
you must write:
   
an example
   a=FindMinimum[x^2,{x,-5}]
   x=a[[2,1]][[2]]

Tony


  • Prev by Date: Re: Q: Help on Plotting with Mathematica
  • Next by Date: Remote Kernel
  • Previous by thread: A quick question
  • Next by thread: Re: A quick question