clear all
format long e

fun_val = zeros(5,1);

x          = [ 1.0; 1.3; 1.6; 1.9; 2.2 ];
fun_val(1) = 0.7651977;
fun_val(2) = 0.6200860;
fun_val(3) = 0.4554022;
fun_val(4) = 0.2818186;
fun_val(5) = 0.1103623;

coef = Newton_Divided_Difference(x, fun_val);

x1 = 0.5:0.001:2.3;
y  = zeros(length(x1),1);
for ii = 1:length(x1)
    y(ii) = poly_val(x1(ii), x, coef); 
end

val = poly_val(1.5, x, coef)

plot(x1,y);
hold on
plot(x,fun_val,'x')
