Add files via upload

This commit is contained in:
Silviu Marian Udrescu 2020-03-23 03:35:19 -04:00 committed by GitHub
parent 5a301e2f48
commit f0cc7dfcaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 1210 additions and 182 deletions

View file

@ -45,11 +45,11 @@ def polyfit(maxdeg, filename):
z = z + ["z"+str(ii)]
variables = np.matmul(C_1_2,variables.T).T
parameters = getBest(variables,f_dependent,maxdeg)[0]
params_error = getBest(variables,f_dependent,maxdeg)[1]
deg = getBest(variables,f_dependent,maxdeg)[2]
res = getBest(variables,f_dependent,maxdeg)
parameters = res[0]
params_error = res[1]
deg = res[2]
x = sympy.Matrix(x)
M = sympy.Matrix(C_1_2)
b = sympy.Matrix(means)
@ -64,11 +64,15 @@ def polyfit(maxdeg, filename):
eq = simplify(eq)
else:
parameters = getBest(variables,f_dependent,maxdeg)[0]
params_error = getBest(variables,f_dependent,maxdeg)[1]
deg = getBest(variables,f_dependent,maxdeg)[2]
res = getBest(variables,f_dependent,maxdeg)
parameters = res[0]
params_error = res[1]
deg = res[2]
eq = mk_sympy_function(parameters,n_variables,deg)
eq = eq.subs("z0","x0")
try:
eq = eq.subs("z0","x0")
except:
pass
return (eq, params_error)