MathGroup Archive 1997

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

Search the Archive

Re: FindMinimum var specification

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

  • Prev by Date: Re: List of lists in MultipleListPlot
  • Next by Date: Help! Integrate...
  • Previous by thread: Re: Arg and Re instructions
  • Next by thread: Help! Integrate...