lambda=633e-9;
L=0.01;
scale=linspace(-L/2,L/2,n);
[X, Y]= meshgrid(scale,scale);
midCirc= X.^2+Y.^2<(1/n)^2;
NmidCirc=not(midCirc);
Ring= ((X-0.8/n).^2+(Y-0.8/n).^2<(1/n)^2)&((X-0.8/n).^2+(Y-0.8/n).^2>(0.6/n)^2);
NRing=not(Ring);
Tshape= (abs(Y)<0.2/n)&(abs(X)<0.6/n) | ((Y<1.4/n)&(Y>0.2/n)&(abs(X)<0.2/n))
func_in.mat=NmidCirc;
func_in.sc=scale;
figure(2)
colormap gray
for j=1:6
func_out=Rdiv(func_in,lambda,Z(j),n);
subplot(2,3,j);
image(func_out.sc, func_out.sc, abs(func_out.mat), 'CDataMapping','scaled');
xlabel('[m]');
ylabel('[m]');
title(['Z=',num2str(Z(j))]);
end