% % % Script de test pour le probleme 2 % % % close all n = 8; X = linspace(0,1,n+1); U = exp(-2*X).*sin(10*pi*X); dU = 10*pi*exp(-2*X).*cos(10*pi*X) -2 *U; x = linspace(0,1,100); u = exp(-2*x).*sin(10*pi*x); uh = hermite(n,X,U,dU,x); plot(x,u,'b-', x, uh, 'r-', X,U,'b.','Markersize',25); title(['Interpolation Hermite : n= ' num2str(n) ' ' ],'Fontsize',15); legend('Fonction u','Interpolation uh', 'U choisis' ,'Location','NorthEast'); end