poly2pwl

poly2pwl(polycost, Pmin, Pmax, npts)

poly2pwl() - Converts polynomial cost variable to piecewise linear.

PWLCOST = POLY2PWL(POLYCOST, PMIN, PMAX, NPTS) converts the polynomial
cost variable POLYCOST into a piece-wise linear cost by evaluating at
NPTS evenly spaced points between PMIN and PMAX. If the range does not
include 0, then it is evaluated at 0 and NPTS-1 evenly spaced points
between PMIN and PMAX.