V is a List of x,y-Tuples, here is some original data:

V=[[0, 3.4900000000000002], [10, 36.299999999999997], [20,
70.299999999999997], [30, 101.3], [40, 128.40000000000001], [50,
153.40000000000001], [60, 176.69999999999999], [70, 202.0], [80,
228.0],
[90, 255.0], [100, 281.0], [110, 306.0], [120, 334.0], [130, 365.0],
[140, 392.0], [150, 415.0], [160, 444.0], [170, 469.0], [180, 493.0],
[190, 516.0], [200, 538.0], [210, 559.0], [220, 579.0], [230, 599.0],
[240, 616.0], [250, 633.0], [260, 649.0], [270, 661.0], [280, 675.0],
[290, 686.0], [300, 699.0], [310, 711.0], [320, 719.0], [330, 727.0],
[340, 735.0], [350, 741.0], [360, 746.0], [370, 750.0], [380, 754.0],
[390, 757.0], [400, 760.0], [410, 762.0], [420, 764.0], [450, 772.0],
[480, 777.0]]

As far as I tested it, it's not data related (used lots of other data
with the same structure,)

Info on my system: Im using sage 4.7.1/ubuntu 11.10 on a Core i3
370M@6GByte Ram

On 14 Nov., 17:23, kcrisman <kcris...@gmail.com> wrote:
> I was trying to reproduce this failure, but I think you may have
> forgotten to add something.  What is V?
>
> Thanks - hopefully we can get to the bottom of this.
>
> - kcrisman
>
> On Nov 13, 6:21 pm, Aran <arant...@freenet.de> wrote:
>
>
>
>
>
>
>
> > I'm using sage for data analysis and number crunching in my physical
> > chemistry class and stumbled on a curiosity while replacing the
> > variables that are used by find_fit:
>
> > When replacing variables like 'a, b ,c' for 'c1, c2, c3' on a 11th
> > degree polynomial the whole find_fit-function goes nuts and the former
> > nicely fitting function doesn't fit at all anymore.
>
> > Example:
> > While the following code works perfectly:
>
> > var('a b c d f g j h k l n o')
> > model(x) = a*x
> > +b*x^(2)+c*x^(3)+d*x^(4)+f*x^(5)+g*x^(6)+h*x^(7)+j*x^(8)+k*x^(9)+l*x^(10)+n 
> > *x^(11)+o
> > m=find_fit(V,model)
> > Temp(x)=model(a=m[0].rhs(),b=m[1].rhs(),c=m[2].rhs(),d=m[3].rhs(),f=m[4].rh 
> > s(),g=m[5].rhs(),h=m[6].rhs(),j=m[7].rhs(),k=m[8].rhs(),l=m[9].rhs(),n=m[10 
> > ].rhs(),o=m[11].rhs())
>
> > The following code does not (replaced only 'a' by 'k1') and Temp(x)
> > shoots off to infinity at some point:
>
> > var('k1 b c d f g j h k l n o')
> > model(x) = k1*x
> > +b*x^(2)+c*x^(3)+d*x^(4)+f*x^(5)+g*x^(6)+h*x^(7)+j*x^(8)+k*x^(9)+l*x^(10)+m 
> > *x^(11)+o
> > m=find_fit(V,model)
> > Temp(x)=model(k1=m[0].rhs(),b=m[1].rhs(),c=m[2].rhs(),d=m[3].rhs(),f=m[4].r 
> > hs(),g=m[5].rhs(),h=m[6].rhs(),j=m[7].rhs(),k=m[8].rhs(),l=m[9].rhs(),n=m[1 
> > 0].rhs(),o=m[11].rhs())

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to