poly1d#

swordfish.function.poly1d()#

Calculate the value of the dependent variable for a one-dimensional polynomial based on the given coefficients and independent variable.

Parameters:
  • model (Constant) – A numeric vector indicating the polynomial coefficients in ascending powers. It must not contain null values.

  • X (Constant) – A numeric scalar or vector indicating the independent variable. It must not contain null values.

Returns:

A numeric vector of the same length as X.

Return type:

Constant