function acc=ComparePoly(x,y,dy,z) % This compares the polynomials given by PolyHorn and EntPoly, % which are the quintic polynomials having values and derivatives % at three points given by x prescribed by the vectors y and dy. % Outputs maximum difference between them over z c=HermInt(x,y,dy); Ip=Horner2(x,c,z); Myp=EntPoly(z,x,y,dy); plot(z,Ip-Myp); acc = max(abs(Ip-Myp));