% Show the use of roots and poly functions.
% Minas Spetsakis, Nov. 2018

r = [1; 2; 3; 3.5];
p = poly(r);

norm(sort(r)-sort(roots(p)))

fplot(@(x)mypolyval(p,x),[min(r)-0.1,max(r)+0.1],'b');
hold on
plot(r,zeros(1,length(r)),'ro');
hold off
