line_equation¶
-
pyoof.
line_equation
(P1, P2, x)[source] [edit on github]¶ Computes the linear equation solution for the \(y\) vector values given two data points, \(P_1 = (x_1, y_1)\) and \(P_2 = (x_2, y_2)\), and the \(x\) vector.
Parameters: P1 :
tuple
First point that belongs to the desired linear equation.
P2 :
tuple
Second point that belongs to the desired linear equation.
x :
ndarray
Data points from the \(x\)-axis.
Returns: y :
ndarray
Linear equation \(y\)-data points.