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].rhs(),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].rhs(),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()) -- 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