有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 T}ZUw;}BL
(mHCK5
2d centered Fourier transform,居中的傅里叶变换 Y)kO"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #{]X<et
% Citation for this code and algorithm: a#iJXI
% Tatiana Latychevskaia and Hans-Werner Fink |[ymNG
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", tta\.ic
% Appl. Optics 54, 2424 - 2434 (2015) 29(s^#e8A
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [FHSFr
E,5
% The code is written by Tatiana Latychevskaia, 2002 ~_SoP
% The version of Matlab for this code is R2010b ,J|8P{ZO
vf=b5s(7Q
function [out] = FT2Dc(u0); 8+ P)V4}
g5gq{KlU
[Nx, Ny] = size(1i,1j);
~yQby&s
={[s)G
f1 = zeros(Nx,Ny); eyq8wQT
Gj6(ycaS
for ii = 1:Nx Yx4TUA$c'
for jj = 1:Ny wAC*D=Qj
f1(ii,jj) = exp(1i*pi*(ii + jj)); KZFnp=i
end <!ewb=[_$
end P4xQ:$2!
Nf.6:=
FT = fft2(f1.*in); :x*|?zII
ai7*</ls
out = f1.*FT; /%w9F
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%