有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 VEH&&@d
BHIRHmM<Y
2d centered Fourier transform,居中的傅里叶变换 bZ?v-fn\D,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% A^nvp!_
% Citation for this code and algorithm: Y#]+Tm(+
% Tatiana Latychevskaia and Hans-Werner Fink 1A?W:'N
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", ~xbe~$$Q@
% Appl. Optics 54, 2424 - 2434 (2015) b[sx_b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% o~U$GBg
% The code is written by Tatiana Latychevskaia, 2002 O%Scjm-^X
% The version of Matlab for this code is R2010b i)o2klIkB
c%^7!FSg
function [out] = FT2Dc(u0); hjU::m,WX
}'5MK
[Nx, Ny] = size(1i,1j); 6|K5!2
ySk R>y
f1 = zeros(Nx,Ny); G|[ =/>~B
9?A)n4b;
for ii = 1:Nx xN>npP
for jj = 1:Ny ; PF`Wj
f1(ii,jj) = exp(1i*pi*(ii + jj)); }Q)#[#e
end {i1|R"ta
end dl.N.P7}4
P!~MZ+7#&
FT = fft2(f1.*in); Yw22z #K
}wWKFX
out = f1.*FT; tf=6\p
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%