%dictionarymatrix.m
function [res]=dictionarymatrix(M,resolution,d,lambda)
res=pi/(resolution-1);
temp2=[];
for m=1:1:resolution-1
temp1=[1];
for n=1:1:M-1
temp1=[temp1 exp(-j*2*pi*cos(m*res)*(n*d)/lambda)];
end
temp2=[temp2; temp1];
end
res=temp2;

