n=5;               % GRADO.
x=-5:10/n:5;        % NODI INTERP. (EQUISPAZ.).
y=cos(x);         % FUNZIONE NEI NODI EQUISP.

s=-5:10/(10*n):5;    % NODI TEST.     
t=interpol(x,y,s);  % INTERPOLANTE NEI NODI TEST.

clf;
hold on;
plot(s,cos(s),'k-','LineWidth',2);
plot(s,t,'g-','LineWidth',2);
plot(x,y,'ko','MarkerSize',6,'MarkerFaceColor','k');   % PLOT INTP..
legend('cos(x)','interpolante(x)','Coppie da interpolare');
hold off;
err_eqs=norm(runge(s)-t,inf);     % ABS. ERR. EQUISPAZ.
fprintf('\n \t [ABS.ERR.][EQS]: %2.2e [CHEB]: %2.2e',err_eqs);