function DOP = wamdopeval(deg,R1,R2,pts,rect);

% by Alvise and Marco Vianello, University of Padova
% October 30, 2014

% computes the Vandermonde matrix of degree deg at the points pts 
% in a discrete orthogonal polynomial basis  

if isempty(rect)
rect=[min(pts(:,1)) max(pts(:,1)) min(pts(:,2)) max(pts(:,2))];
end

W=chebvand(deg,pts,rect);
DOP=(W/R1)/R2;

end




