MathGroup Archive 2006

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

Search the Archive

Re: FindMinimum during NMimimize


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