function out=Dm2d(x,y,M1,M2,N1,N2)
%
% compute 2d Dirichlet function at x,y
%
% function out=Dm2d(x,y,M1,M2,N1,N2)
%
% out=Dm(x,M1,N1)*Dm(y,M2,N2) 
%  -equivalent to-
% out=sin(pi*(2*M1+1)*x/N1) / (N1*sin(pi*x/N1)) *
%     sin(pi*(2*M2+1)*y/N2) / (N2*sin(pi*y/N2))
%
% x and y should be the same size
%
% uses Dm.m
%

% written by D.G. Long at BYU 30 Dec 2010

out=Dm(x,M1,N1).*Dm(y,M2,N2);
