MathGroup Archive 1995

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

Search the Archive

Fit[] problem


I have a problem with Fit[] (I'm using Mathematica for Student 2.2.1 Windows).
Here is the session:

in : ( data = Table[ Sum[i,{i,1,n}] , {n,0,100} ] ) //Short
out: {0, 1, 3, 6, 10, 15, 21, 28, 36, <<88>>, 4753, 4851, 4950, 5050}
in : Chop[ Fit[ data , {1,x,x^2} , x ] ]
                   2
out: -0.5 x + 0.5 x
     ^^^^^^^^^^^^^^^ and this is ok ... but ...

in : Chop[ Fit[ data , {1,x,x^2,E^x} , x ] ]
out: 0
    ^^^ Why ?!?!?

I don't understand why the result change adding an useless function...
someone knows ?

             Thanks in advance, Giovanni

--
Giovanni Lagorio      | Real programmers don't comment their code.
glagorio at mbox.vol.it  | It was hard to write, it should be hard to understand.



  • Prev by Date: Re: RealDigits
  • Next by Date: Re: Bugs with transcendental functions?
  • Previous by thread: Re: RealDigits
  • Next by thread: Re: Fit[] problem