a guest Feb 11th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- import pyeq3, warnings
- warnings.filterwarnings("ignore") # we can ignore covariance warning
- functionString = '4 * log(X/n)/log(n/m) + 5'
- # note that the constructor is passed the function string here
- equation = pyeq3.Models_2D.UserDefinedFunction.UserDefinedFunction(inUserFunctionString = functionString)
- textData = '''
- X Y
- 1 -1.2131790227
- 2 1
- 3 2.2946267356
- 4 3.2131790227
- 5 3.9256635291
- pyeq3.dataConvertorService().ConvertAndSortColumnarASCII(textData, equation, False)
- for i in range(len(equation.solvedCoefficients)):
- print(" %s = %-.16E" % (equation.GetCoefficientDesignators()[i], equation.solvedCoefficients[i]))
RAW Paste Data