function [ y ] = evalLagrangePolynomial( X, x, k )
%evalLagrangePolynomial Evaluates a Lagrange polynomial
%   Detailed explanation goes here

y = 1;
n = size(X, 2);

for i=1:n
    if k~=i
        y = y * (x - X(i)) / (X(k) - X(i));
    end
end

end

