totcost

totcost(gencost, Pg)

totcost() - Computes total cost for generators at given output level.

TOTALCOST = TOTCOST(GENCOST, PG) computes total cost for generators given
a matrix in gencost format and a column vector or matrix of generation
levels. The return value has the same dimensions as PG. Each row
of GENCOST is used to evaluate the cost at the points specified in the
corresponding row of PG.