Fit[] problem
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg1806] Fit[] problem
- From: glagorio at vol.it (Giovanni Lagorio)
- Date: Mon, 31 Jul 1995 23:08:25 -0400
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.