MathGroup Archive 2007

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

Search the Archive

NMinimize

  • To: mathgroup at smc.vnet.net
  • Subject: [mg81740] NMinimize
  • From: Raj <rajanikanth at gmail.com>
  • Date: Tue, 2 Oct 2007 05:47:30 -0400 (EDT)

hi!
Could somebody tell me if there is a better way to do this in
Mathematica:

data = Flatten@Import["moistureAtDepth1.dat"];
data = data[[20000 ;; 30000]];
ti = Import["times.dat"];
func[x_, Di_, De_, t_, t1_, t2_] :=
   (Erfc[x/Sqrt[2400 Di (t - t1)]] -
   Erfc[x/Sqrt[2400 Di (t - t2)]] +
   Erf[x/Sqrt[2400 De (t - t2) ]])
parameters = {Di,De};
NMinimize[ {Plus@@Table[ (data[[i-20000]] -
      Plus @@ ((func[15.2, Di, De, i, First@#, Last@#] &) /@
         Select[ti, i - 2880 <= #[[2]] <= i-1 &]))^2,{i,22881,25000}],
10^-8<=Di<=10^-1,10^-8<=De<=10^-1},parameters]

I am interested in Optimizing  the NMinimize line.

Thanks,

Raj



  • Follow-Ups:
  • Prev by Date: Re: Sort problem
  • Next by Date: Re: Modifying the Default stylesheet?
  • Previous by thread: GraphicsGrid and DataRange
  • Next by thread: RE: NMinimize