line

mdtools.functions.line(x, m=1, c=0)[source]

Straight line:

\[g(x) = mx + c\]
Parameters:
  • x (scalar or array_like) – Value(s) at which to evaluate \(g(x)\).

  • m (scalar or array_like, optional) – Slope(s).

  • c (scalar or array_like, optional) – y-axis intercept(s).

Returns:

g (scalar or numpy.ndarray) – The outcome of \(g(x)\). \(g(x)\) is evaluated element-wise if at least one of the input arguments is an array.

See also

mdtools.functions.line_inv()

Inverse of a straight line

Notes

If more than one input argument is an array, all arrays must be broadcastable.