MathGroup Archive 1997

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

Search the Archive

Re: FindMinimum var specification

  • To: mathgroup at
  • Subject: [mg8870] Re: [mg8828] FindMinimum var specification
  • From: Allan Hayes <hay at>
  • Date: Tue, 30 Sep 1997 20:16:35 -0400
  • Sender: owner-wri-mathgroup at

"Bernd Gehrmann" <gehrmab at>
[mg8828] FindMinimum var specification

>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];

Explanation: FindMinimum has attribute HoldAll and seems to be  
checking input before evaluating vars.

Solution: make it evaluate vars.

vars := Sequence[{x[1],0.1},{x[2],0.1}]

FindMinimum[x[1]^2 + x[2]^2,Evaluate[vars]]

	FindMinimum::"fmgz": "Encountered a vanishing gradient. The 	
	result returned may not be a minimum; it may be a maximum or 	
	a saddle point."


Allan Hayes
hay at
voice:+44 (0)116 2714198
fax: +44 (0)116 2718642
Leicester,  UK

  • Prev by Date: FindRoot
  • Next by Date: Q: 3D convex hull?
  • Previous by thread: Re: FindMinimum var specification
  • Next by thread: [Help?] Integer/Decimal portion of a real number