function [ X_eval ] = Evaluate_monomials( X,n,monomials,number_poly,deg_poly,d )
%UNTITLED2 Summary of this function goes here
%   Detailed explanation goes here

X_eval=zeros(n,number_poly);

for i=1:n

    Dummy=zeros(deg_poly+1,d); 

    for dim=1:d

        Dummy(:,dim)=X(i,dim).^((0:deg_poly))';

    end

    Dummy2=zeros(number_poly,d);
    for dim=1:d
       Dummy2(:,dim)=Dummy(monomials(:,dim)+1,dim);
    end

    X_eval(i,:)=(prod(Dummy2,2))';

end

end

