<< plq_pa_mu plq plq_plotMultiple >>

CCA (Computational Convex Analysis) >> plq > plq_plot

plq_plot

Piecewise linear quadratic (plq), plot function

Calling Sequence

plq_plot(plqf1, plqf2, x1, x5)

Parameters

plqf1

matrix. A plq function to plot.

plqf2

matrix, optional. A secondary plq function to plot.

n
x1

number, optional. The lower x bound of the grid on which the functions are plotted.

x5

number, optional. The upper x bound of the grid on which the functions are plotted.

Description

Initializes and creates a plot of one or two 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.

Examples

// Plotting two functions with a specific grid:
plqf1 = [-1,0,-1,-1;0,0,1,1;1,0,-1,1;%inf,0,1,-1];  // The function abs(abs(x) - 1)
plqf2 = [-1,-3,-12,-9;1,4,0,-4;%inf,-3,12,-9];      // An "m"
plq_plot(plqf1, plqf2, -4, 4);

// Plotting a single, noncontinuous function:
plqf = [0,-3,-18,-29;3,0,-2,6;%inf,0,40,-170];
plq_plot(plqf);

See Also

Authors

Bryan Gardiner, University of British Columbia, BC, Canada

<< plq_pa_mu plq plq_plotMultiple >>