有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 7(;VUR%%.
iau&k`b`
2d centered Fourier transform,居中的傅里叶变换 zK92:+^C
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% <coCu0
% Citation for this code and algorithm: pk4&-iu9
% Tatiana Latychevskaia and Hans-Werner Fink f5-={lUlIS
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", ~k(Ez pn#
% Appl. Optics 54, 2424 - 2434 (2015) mx4*zj
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /0uinx
% The code is written by Tatiana Latychevskaia, 2002 [)pT{QA
% The version of Matlab for this code is R2010b yB1>83!q
8gxLL59
function [out] = FT2Dc(u0); J#]yKgT
l :"*]m7o_
[Nx, Ny] = size(1i,1j); jFv<]D%A[
SAJ=)h~
f1 = zeros(Nx,Ny); D=vq<X'
.#J3UZ
for ii = 1:Nx QAwj]_
for jj = 1:Ny 6KG 63`aQ
f1(ii,jj) = exp(1i*pi*(ii + jj)); LfApVUm
end H%N+Vr3O,
end (ce NVo&
H/&Q,9sU21
FT = fft2(f1.*in); WXU6J?tIm
{LDb*'5Cy
out = f1.*FT; ,gc#N
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%