<< plq_deconv_lft | plq | plq_dom >>

CCA (Computational Convex Analysis) >> plq > plq_diff

# plq_diff

Piecewise linear quadratic (plq), function differentiation

### Calling Sequence

    plqdf = plq_diff(plqf)

### Parameters

plqf

  matrix. A PLQ function.

plqdf

  matrix. The PLQ function that is the derivative of plqf.

### Description

Computes the piecewise linear derivative of plqf as a PLQ function. An error will be raised if plqf is not differentiable.

This function runs in O(n) time, where n is the number of pieces in plqf.

### Examples

    plqf = [-1,1,2,1; 1,0,0,0; %inf,1,-2,1];
    plqdf = plq_diff(plqf),
    scf(); plq_plot(plqf);
    scf(); plq_plot(plqdf);

### See Also

- plq_function

### Authors

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

<< plq_deconv_lft | plq | plq_dom >>