plq_plot2 - Piecewise linear quadratic (plq), plot multiple functions
Plots a number of PLQ functions computed over the interval [x1,x5]. If x1 or x5 are not provided, or are -%inf and %inf respectively, then they default to -5 and 5.
f1 = [-1,0,-1,-1;0,0,1,1;1,0,-1,1;%inf,0,1,-1]; // The function abs(abs(x) - 1) f2 = [-1,-3,-12,-9;1,4,0,-4;%inf,-3,12,-9]; // An "m" f3 = [0,-3,-18,-29;3,0,-2,-30;%inf,0,40,-156]; // Another function clf(); plq_plot2(-4, 4, f1, f2, f3);
Bryan Gardiner, University of British Columbia, BC, Canada