To Remove Spaces In Between The Images And Assign Indices For Each Image
古いコメントを表示
Hi,
I have written a Matlab coding to generate an array of holograms(4x4) as follows:
a=-1:2/127:+1;
b=-1:2/127:+1;
[X, Y]=meshgrid(a,b);
r=sqrt(X.^2+Y.^2)<1;
Z4=sqrt(3).*(2.*(X.^2+Y.^2)-1);
Z5=2.*sqrt(6).*X.*Y;
Z6=sqrt(6).*(X.^2-Y.^2);
Phi=(Z4+Z5+Z6);
mx=30;
my=25;
i=sqrt(-1);
Tau=mx.*X+my.*Y;
Theta=Phi+Tau;
if cos(Theta)>=0
t=1;
else
t=0;
end
t=(1/2)+(1/pi)*(exp(i*Theta)+exp(-i*Theta)-(1/3)*(exp(i*3*Theta)+(exp(-i*3*Theta)+(1/5)*(exp(i*5*Theta)+(exp(-i*5*Theta))))));
h=t.*r;
figure(1)
imagesc(h),colormap gray
xlabel('X-Cordinate');
ylabel('Y-Cordinate');
title('Binary Hologram');
b=fftshift(fft2(t,256,256));
figure(2)
imagesc(abs(b)),colormap gray
title('FFT Of Binary Hologram');
figure(3)
for k =1:16
p(i,j)=subplot(4,4,k);
imagesc(h),colormap gray;axis image;axis off
end
*****************
When you run the following program, in figure(3) you will find an array of holograms. My problem is that how can I remove the spaces in between the consecutive holograms so that one hologram just touches the other? Also how can I assign indices to each particular hologram in fig.(3), so that I can further modify any particular hologram according to my need?
Can anyone please help me out in this regard?
Thanking You!
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Images についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!