Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2008

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

Search the Archive

Re: FindFit

  • To: mathgroup at
  • Subject: [mg92743] Re: FindFit
  • From: psycho_dad <s.nesseris at>
  • Date: Sun, 12 Oct 2008 04:31:27 -0400 (EDT)
  • References: <> <gcq097$c2k$>

Since you have to deal with quite large numbers, one way to do it is
to use logarithms:

data=Table[{n,Log[(1/2) ((1+Sqrt[13])^(2^n)+(1-Sqrt[13])^(2^n))]},{n,

FindFit[data,Log[(1/2) ((a+Sqrt[b])^(2^x)+(a-Sqrt[b])^(2^x))],{{a,2},

Out: {a\[Rule]1.000000000,b\[Rule]13.00000000}

The only reason that I have specified a direction {{a,2},{b,10}} is
because your model is degenerate with respect to a. If I didn't do it
then you might get the other minimum (equivelent but not the one you
want)   {a\[Rule]-1.000000000,b\[Rule]13.00000000}. Note also that
now, you no longer require such large working precision.


  • Prev by Date: Re: Mathematica Plot Functions
  • Next by Date: Variable amount of Buttons in Mathematica
  • Previous by thread: Re: FindFit
  • Next by thread: Re: FindFit