more clear.

is increasing, negative where f (x) is decreasing, and zero where f (x) has a local

extremal point.

% polid = polyderiv(poli); % Octave only

polid = poli(1:length(poli)-1).*[length(poli)-1:-1:1];

plot(x, y, '-'); hold on;

plot(x, yp, '--'); hold off;

ylabel('y, y`');

xlabel('x');

title('y(x), dy/dx');

grid;

% replot; % Octave only

mial, whose coefficients are specified in poli, in correspondence with the points

specified in x. The second directive is the function invocation polideriv(poli),

which returns the coefficient of the polynomial that is the derivative of poli.

This function is not available in Matlab, but it can be replaced by an explicity

calculation, as indicated in the script. The fact that the derivative of a polyno-

mial is still a polynomial is ensured by the derivation rules of calculus. Namely,

the derivative of a monomial is a lower-degree monomial given by the rule