<< plq_plotMultiple | plq | plq_plotpa_lambdaSet >>

CCA (Computational Convex Analysis) >> plq > plq_plotpa

# plq_plotpa

Piecewise linear quadratic (plq), plot convex proximal average

### Calling Sequence

    plq_plotpa(plqf1, plqf2, x, lset, rect)
    plq_plotpa(plqf1, plqf2, x, lset, rect, isConvex)

### Parameters

plqf1

  matrix. The first function of the proximal average (lambda=0).

plqf2

  matrix. The second function of the proximal average (lambda=1).

x

  column vector. The points at which to evaluate the proximal average.

lset

  column vector. The lambda values at which to plot the proximal average.

rect

  row vector. [xmin,ymin,xmax,ymax] for the plot window as with plot2d.

isConvex

  boolean, optional. Whether or not plqf1 and plqf2 are both convex. Defaults to %t.

### Description

For each lambda in lset, plots the proximal average of two PLQ functions over the provided x values. The rect argument bounds the plot's visible region and is required. All of the proximal averages are plotted on the same graph, and the colours of successive PA's fade from blue (lambda=0) to red (lambda=1) via jetcolormap.

### Examples

    plqf1 = [2,1,0,0;%inf,0,0,%inf];
    plqf2 = [3,0,0,%inf;4,0,-1,4;%inf,0,1,-4];
    x = linspace(-3, 7, 100)';
    lset = 0:0.01:1;
    rect = [-3,0,7,10];
    plq_plotpa(plqf1, plqf2, x, lset, rect);
    plot2d(x, [plq_eval(plqf1, x), plq_eval(plqf2, x)]);
    a = gca();
    a.children(1).children(1).thickness = 5;
    a.children(1).children(2).thickness = 5;

### See Also

- plq_function

### Authors

`Bryan Gardiner`, University of British Columbia, BC, Canada

<< plq_plotMultiple | plq | plq_plotpa_lambdaSet >>