function polynomial = horner_eval(c, y) % Compute the value of a polynomial with coefficients C1, C2, ... Cn % at the point y using Horner's method len = length(c); polynomial = c(len); for i=len-1:-1:1 polynomial = polynomial*y + c(i); end