%Program 0.1 Nested multiplication %Evaluates polynomial from nested form using Horner's method %Input: % array of d+1 coefficients (constant term first), % x-coordinate x at which to evaluate, and % array of d base points b %Output: value y of polynomial at x function y=nest(c,x,b) d=length(c)-1; y=c(d+1); for i=d:-1:1 y = y.*(x-b(i))+c(i); end