有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 sKd)BA0`
s@~/x5jwCs
2d centered Fourier transform,居中的傅里叶变换 <Oa9oM},d
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% t#5:\U5r.
% Citation for this code and algorithm: Lm|al.Z
% Tatiana Latychevskaia and Hans-Werner Fink 6vobta^w
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", K_#UZA< Y
% Appl. Optics 54, 2424 - 2434 (2015) l3p3tT3+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3gc"_C\$
% The code is written by Tatiana Latychevskaia, 2002 D0 ruTS
% The version of Matlab for this code is R2010b wAh#
Q#pnj thM
function [out] = FT2Dc(u0); <KLg0L<W
oy5+}`
[Nx, Ny] = size(1i,1j); 7`fY*O6
q-
:4=vkn
f1 = zeros(Nx,Ny); +"uwV1)b"
tS<h8g_
for ii = 1:Nx j#3m|dQ
for jj = 1:Ny jDTUXwx7V
f1(ii,jj) = exp(1i*pi*(ii + jj)); WNF9#oN|oT
end b_vTGl1_6
end v`B4(P1Z
<*Ub2B[m
FT = fft2(f1.*in); j Nc<~{/
Qh-4vy=r
out = f1.*FT; /^2CGcT(
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%