function [y] = polynomial_deriv(coeff, x)
n = length(coeff);
L = length(x);
x0 = ones(1,L);
y = zeros(1,L);
for i = 2:n
    y = y + coeff(i)*(i-1)*x0;
    x0=x0.*x;
end
end

