## Name

gph_plq — Convert a standard PLQ model to a PLQ subdifferential model.

## Calling Sequence

    gph = gph_plq(plq)

## Parameters

plq

  matrix. A PLQ function.

## Description

Converts a PLQ function into a matrix representing its subdifferential by storing points on the subdifferential's graph, as well as the values of the original function, in order to be able to integrate.

This function runs in linear time with respect to the number of pieces in the PLQ function.

## Examples

    // The absolute-value function.
    plq = [0,0,-1,0; %inf,0,1,0];
    gph = gph_plq(plq),
    // gph  =
    //
    //  - 1.    0.    0.    1.
    //  - 1.  - 1.    1.    1.
    //    1.    0.    0.    1.

    // A "\_/" function.
    plq = [0,0,-1,0; 1,0,0,0; %inf,0,1,-1];
    gph = gph_plq(plq),
    // gph  =
    //
    //  - 1.    0.    0.    1.    1.    2.
    //  - 1.  - 1.    0.    0.    1.    1.
    //    1.    0.    0.    0.    0.    1.

## See Also

plq_gph

## Authors

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