From 5382ed2d4fd42c8c523cca6a83936bf89ef9b62e Mon Sep 17 00:00:00 2001 From: "a.ott" Date: Wed, 15 Jan 2020 14:34:38 +0100 Subject: [PATCH] add line function and its inverse --- functions.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/functions.py b/functions.py index 624ff2f..ab00e7c 100644 --- a/functions.py +++ b/functions.py @@ -2,6 +2,14 @@ import numpy as np +def line(x, m, c): + return m*x + c + + +def inverse_line(x, m, c): + return (x-c)/m + + def exponential_function(x, a, b, c): return (a-c)*np.exp(-x/b)+c