Piecewise linear quadratic (plq), Maximum function
[plqm, maxf] = plq_max(plqf, plqg)
matrix. One of the plq functions to compute the maximum of.
matrix. The other plq function to compte the maximum of.
matrix. A plq function equal to the maximum of plqf and plqg.
matrix. Specifies the intervals over which each function was the maximum.
Creates a plq function representing the maximum of plqf and plqg for all x values. This function runs in O(m+n) time and returns a plq function containing O(m+n) pieces, where m and n are the number of pieces in plqf and plqg, respectively.
Bryan Gardiner
, University of British Columbia, BC, Canada