how to increase magnification of images 2,3,4?
2 ビュー (過去 30 日間)
古いコメントを表示
clear all;
clc;
close all;
dim=32;
[kx,ky]=meshgrid(-1:2/(dim-1):1);
circ=sqrt(kx.^2+ky.^2)<1;
alp=asin(0.95);
k0=1/sin(alp);
k=256;
kz=sqrt(k0^2-(kx.^2+ky.^2));
Gx=-1i*sqrt(k0./kz).*((k0*ky.^2+kz.*kx.^2)./(k0*(kx.^2+ky.^2)));
Gy=1i*sqrt(k0./kz).*((kz-k0).*kx.*ky)./(k0*(kx.^2+ky.^2));
Gz=1i*sqrt(k0./kz).*(kx./k0);
Fx=1i*sqrt(k0./kz).*((kz-k0).*kx.*ky)./(k0*(kx.^2+ky.^2));
Fy=-1i*sqrt(k0./kz).*((k0*kx.^2+kz.*ky.^2)./(k0*(kx.^2+ky.^2)));
Fz=1i*sqrt(k0./kz).*(ky./k0);
ph=(atan2(kx,ky)+pi);
ph=rot90(ph,3);
l0=exp(1i*ph);
la=l0*1i;
lb=rot90(l0,3);
z=-128:1:127;
c = numel(z);
mz=(pi/(8*2*tan(alp/2)));
n = size(kx);
Ex = zeros([k k c]);
Ey = zeros([k k c]);
Ez = zeros([k k c]);
for jj=1:c
Ex(:,:,jj)=fftshift(fft2(exp(1i*kz*mz*z(jj)).*
(Gx.*la.*circ)-rot90(exp(1i*kz*mz*z(jj)).*Gy.*lb.*circ,3),k,k));
Ey(:,:,jj)=fftshift(fft2(exp(1i*kz*mz*z(jj)).*
(Gy.*la.*circ)+rot90(exp(1i*kz*mz*z(jj)).*Gx.*lb.*circ,3),k,k));
Ez(:,:,jj)=fftshift(fft2(exp(1i*kz*mz*z(jj)).*
(Gz.*la.*circ)+rot90(exp(1i*kz*mz*z(jj)).*Gz.*lb.*circ,3),k,k));
end
Ex=Ex(k/2,:,:);
Ey=Ey(k/2,:,:);
Ez=Ez(k/2,:,:);
Ex=squeeze(Ex);
Ey=squeeze(Ey);
Ez=squeeze(Ez);
Ix=Ex.*conj(Ex);
Iy=Ey.*conj(Ey);
Iz=Ez.*conj(Ez);
I3=Ix+Iy;
figure(2)
imagesc(I3),colormap gray;%axis image
figure(3)
imagesc(Iz),colormap gray;%axis image
I=Ix+Iy+Iz;
figure(4)
imagesc(I),colormap gray;%axis image
can any one help in this regard,
thank you in advance
0 件のコメント
回答 (1 件)
Image Analyst
2013 年 3 月 26 日
There is a zoom() function. In addition, in the imshow() function, there is an 'InitialMagnification' option.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!