Code covered by the BSD License
30 Apr 2009
05 Apr 2012)
Numerical computation with functions instead of numbers.
This file was selected as MATLAB Central Pick of the Week
function pass = polytest
% This test check that poly and ployval are working correctly.
% Rodrigo Platte Feb 2009
c = rand(1,5);
f = chebfun(@(x) polyval(c,x), [-2 10],5);
pass = norm(c - poly(f)) < chebfunpref('eps')*1e5;