有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 WwBOM~/`2
b_#m}yZ6
2d centered Fourier transform,居中的傅里叶变换 qn<|-hA*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% $m%fwB
% Citation for this code and algorithm: j_!F*yul
% Tatiana Latychevskaia and Hans-Werner Fink RXpw!
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", mzaWST]
% Appl. Optics 54, 2424 - 2434 (2015) 6xe*E[#k\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% QT<
}]
0
% The code is written by Tatiana Latychevskaia, 2002 J!v3i*j\
% The version of Matlab for this code is R2010b <EB+1GFuI
8>2.UrC
function [out] = FT2Dc(u0); h5{'Q$Erl
MSQEO4ge
[Nx, Ny] = size(1i,1j); 3nIU1e
H1pO!>M
f1 = zeros(Nx,Ny); !N\@'F!
L3u&/Tn2
for ii = 1:Nx E"\<s3
for jj = 1:Ny |"X*@s\'
f1(ii,jj) = exp(1i*pi*(ii + jj)); t9k zw*U9
end (Ft+uuG
end ~ drS} V
6@h/*WElG
FT = fft2(f1.*in); oo/qb`-6
a?I=
!js
out = f1.*FT; )0.kv2o.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%