ppval
Piecewise polynomial evaluation.
Syntax
yi = ppval(pp, xi)
Inputs
- pp
- A piecewise polynomial struct.
- xi
- The values at which to evaluate the polynomial.
Outputs
- yi
- The evaluated polynomial values.
Example
breaks = [10, 20, 30, 40, 50];
L = length(breaks) - 1;
order = 3;
coefs = zeros(L, order);
coefs(1, :) = [2, 3, 4];
coefs(2, :) = [3, 4, 5];
coefs(3, :) = [4, 5, 6];
coefs(4, :) = [6, 7, 8];
pp = mkpp(breaks, coefs);
yi = ppval(pp, [24, 31])
yi = [Matrix] 1 x 2
69 15