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 :
tupleFirst point that belongs to the desired linear equation.
P2 :
tupleSecond point that belongs to the desired linear equation.
x :
ndarrayData points from the \(x\)-axis.
Returns: y :
ndarrayLinear equation \(y\)-data points.