有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 2|`Mb~E;
%O7?:#_
2d centered Fourier transform,居中的傅里叶变换 `/WOP`'zM
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {e0aH `me
% Citation for this code and algorithm: pF}E`U=Z
% Tatiana Latychevskaia and Hans-Werner Fink Vn_>c#B
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", x_/H
% Appl. Optics 54, 2424 - 2434 (2015) F#qc#s
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Y'R/|:YL@
% The code is written by Tatiana Latychevskaia, 2002 *ODc[k'(
% The version of Matlab for this code is R2010b >km$zfM2-
F>%,}Y~B:
function [out] = FT2Dc(u0); (+BrC`
%0f*OC
[Nx, Ny] = size(1i,1j); z@jKzyq
sp0_f;bC
f1 = zeros(Nx,Ny); cwQ*P$n
Z1(!syg
for ii = 1:Nx K;TTGK
for jj = 1:Ny |47 2X&e
f1(ii,jj) = exp(1i*pi*(ii + jj)); tM;+U
end piIGSC
end N2u4MI2
avXBCvP+h
FT = fft2(f1.*in); ax2#XSCO
R m2M
out = f1.*FT; QP@@h4J^
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%