Re: FindMinimum var specification
- To: mathgroup at smc.vnet.net
- Subject: [mg9000] Re: FindMinimum var specification
- From: Robert Knapp <rknapp>
- Date: Tue, 7 Oct 1997 03:35:47 -0400
- Organization: Wolfram Research, Inc.
- Sender: owner-wri-mathgroup at wolfram.com
Bernd Gehrmann wrote:
>
> Hello,
>
> why does the following not work (and how can
> I make it work)?
>
> vars := Sequence[{x[1],0.1},{x[2],0.1}];
>
> ...
>
> FindMinimum[x[1]^2 + x[2]^2, vars];
>
> Bernd.
This doesn't work because FindMinimum has the HoldAll attribute.
To have this recognized properly as the variable specification it
is it needs to be evaluated.
FindMinimum[x[1]^2 + x[2]^2, Evaluate[vars]]
does what you want.
Rob Knapp
Wolfram Research