vq = ppval(pp, xq)
| Parameter | Description |
|---|---|
| pp | Piecewise polynomial structure, such as the structure returned by interp1(..., 'pp'). |
| xq | Query points. |
| Parameter | Description |
|---|---|
| vq | Values of the piecewise polynomial at xq. |
ppval evaluates a piecewise polynomial structure. The structure contains breaks, coefficients, number of pieces, order, and output dimension.
For the interpolation workflow, create pp with interp1(x, v, method, 'pp'), then evaluate it repeatedly with ppval.
x = 1:4;
v = [10 20 40 80];
pp = interp1(x, v, 'linear', 'pp');
ppval(pp, [1.5 2.5])