plq_conv_on_interval - Piecewise linear quadratic (plq), two-piece convexity on interval
Takes two adjacent pieces of a plq function, and the intervals over which they are defined, and returns a plq function that is defined over the domain of both of the pieces, and is the convex hull of both of the pieces.
plqf = [1,1,0,0; 4,0,0,1]; f1 = plqf(1,:); f2 = plqf(2,:); x1=-2.5; x3=f1(1,1); x5=f2(1,1); result = plq_conv_on_interval(f1,f2,x1,x3,x5); // [0.1270167,1,0,0; 4,0,0.2540333,-0.0161332] plq_plot(plqf, result, -2.5, 4);
Bryan Gardiner, University of British Columbia, BC, Canada