Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

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


  • 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...