%
% Beispiel von Runge: Spline vs. Newton (Serie 3, Aufgabe 3)
%
% Vorlesung "Einfuerung in die Numerik", Uni Basel, FS11
%

clear all
clf

n = 12;
j = 0 : n;

X = ... ;     % aequidistante Stuetzstellen
Y = ... ;  % Stuetzwerte

x_plot = -5:0.01:5;
y_plot = ... ;

% Newton-Interpolation
interpol_equidistant = Newton_Interpol(X, Y, x_plot);

% Spline-Interpolation
interpol_spline = spline(..., ..., ...) ;

figure()
plot(x_plot,interpol_equidistant,'--',x_plot,interpol_spline,X,Y,'o')
xlabel('x')
legend('Newton-Inter.', 'Spline-Inter.')
axis([-1 1 -4 1.5])
