MathGroup Archive 2000

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

Search the Archive

Q: intercepting intermediate results


When using e.g.  NonlinearFit one can give the option ShowProgress. How do I
to intercept the intermediate results and store them in a vector for
instance?

an example:

NonlinearFit[data,  a+b Cos[c t] , t, {{a,1}, {b, 1}, {c, 1}},
 ShowProgress -> True]

gives:

Iteration:1  ChiSquared:10.382188091942671` Parameters:{1.`,1.`, 1.`}

Iteration:2  ChiSquared:10.382188091942671` Parameters:{0.36,1.40, 1.45}

Iteration:3  ChiSquared:10.382188091942671` Parameters:{0.23,1.33, 1.29}

Iteration:4  ChiSquared:10.382188091942671` Parameters:{0.22,1.33, 1.28}

Out[13]= 0.22+1.33 cos[1.28 t]

How do I get: the result from iteration 3 for example (without cut and
paste)?




  • Prev by Date: Re: best solution?
  • Next by Date: Re: best solution?
  • Previous by thread: Re: uninstalling mathreader
  • Next by thread: Fast List Manipulation & more