% Section 3.1, problem 6(a) format long x=[ 0 0.25 0.5 0.75]; z=[ 1 1.64872 2.71828 4.48169]; xstar = 0.43; n = length(x)-1; for j = 1:n for i = n:-1:j z(i+1) = ( (xstar-x(i-j+1))*z(i+1) - (xstar-x(i+1))*z(i) ) ... /( x(i+1)-x(i-j+1) ) ; end end z(n+1)