function V = VandermondeMatrix1D(N,r)

% computes Vandermonde matrix (as in Hesthaven book) using provided set of nodes (Gauss-Lobatto guadratture nodes) for further computation of mass matrix
% length(r) - 1 = degree of polynomial representing local solution

N_p = N + 1;
V = zeros(N_p);
LegPols = LegendrePolynomialsNormalized(N_p - 1);

for i = 1:N_p
	V(:,i) = polyval(LegPols{i},r);
end

end
