From ce8ae58a79f6f765d10508b5139692396526a18f Mon Sep 17 00:00:00 2001 From: Silviu Marian Udrescu Date: Sun, 28 Jun 2020 20:17:20 -0400 Subject: [PATCH] Add files via upload --- Code/S_polyfit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/S_polyfit.py b/Code/S_polyfit.py index 2bd9a0f..2310835 100644 --- a/Code/S_polyfit.py +++ b/Code/S_polyfit.py @@ -70,6 +70,8 @@ def polyfit(maxdeg, filename): deg = res[2] eq = mk_sympy_function(parameters,n_variables,deg) + for i in range(len(x)): + eq = eq.subs(z[i],x[i]) eq = simplify(eq) else: @@ -85,5 +87,3 @@ def polyfit(maxdeg, filename): return (eq, params_error) - -