Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

How to specify the gradient of this function?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125032] How to specify the gradient of this function?
  • From: Sam Takoy <sam.takoy at yahoo.com>
  • Date: Sun, 19 Feb 2012 06:27:39 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Hi,

If I could ask you to take a look at this code:

objF[x_, v_] := (x - 2)^4 + Norm[v]^2;
FindMinimum[objF[x, v], {{x, 1}, {v, {1, 1, 1, 1}}}, StepMonitor :>
Print[x, " ", v]]

My objF takes a number and a vector. Is there a way to specify a
gradient for a function with such a mix of inputs?

Many thanks in advance,

Sam



  • Prev by Date: Why HoldForm[] shows this expression in red in notebook?
  • Next by Date: Re: How best to implement a hash table in Mathematica
  • Previous by thread: Re: Why HoldForm[] shows this expression in red in notebook?
  • Next by thread: Re: How to specify the gradient of this function?