MathGroup Archive 2006

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

Search the Archive

Re: FindMinimum during NMimimize

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65576] Re: FindMinimum during NMimimize
  • From: bghiggins at ucdavis.edu
  • Date: Sun, 9 Apr 2006 04:32:03 -0400 (EDT)
  • References: <e15el3$2ri$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Mario,

Redefine your function DistanceOverX to take numerical values as its
arguments:

distanceOverX[ma1_?NumericQ,
     ma2_?NumericQ, slopex_?NumericQ, intx_?NumericQ] :=
FindMinimum[Sqrt[(ma1 - x)^2 + (ma2 - discra[x, slopex, intx])^2], {x,
\
10, 20}][[1]]

discra[x_, slopex_, intx_] := x*slopex + intx

NMinimize[{(distanceOverX[1, 1, 0, intx] - 100)^2, 0 < intx < 10},
{{intx, 2, 3}}, Method -> {"NelderMead", RandomSeed ->
      101}, MaxIterations -> 100]

{8281., {intx -> 10.}}

Cheers,

Brian


  • Prev by Date: Help with Identities
  • Next by Date: Re: Permutations
  • Previous by thread: FindMinimum during NMimimize
  • Next by thread: Re: FindMinimum during NMimimize