Re: Using a Result from NMinimize
- To: mathgroup at smc.vnet.net
- Subject: [mg49410] Re: Using a Result from NMinimize
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Sun, 18 Jul 2004 08:09:20 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On 7/16/04 at 6:06 AM, gregory.lypny at videotron.ca (Gregory Lypny)
wrote:
>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 ->.
NMimimize like several other functions returns a result in the form of a replacement rule. In every case the value can be accessed using a construct like
variable/.rule
In the particular case you show you can get what you want with
rp/.Last@result
where result is the result returned by NMinimize
--
To reply via email subtract one hundred and four