有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 }C_g;7*
*
cW%Q@lit
2d centered Fourier transform,居中的傅里叶变换 4bGvkxZo`$
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% &%j`WF4p
% Citation for this code and algorithm: O713'i
% Tatiana Latychevskaia and Hans-Werner Fink rBmW%Gv
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", k8}fKVU;
% Appl. Optics 54, 2424 - 2434 (2015) ];Noe9o
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% =<H ekiYM
% The code is written by Tatiana Latychevskaia, 2002 j:1N&7<FU
% The version of Matlab for this code is R2010b jc_k\
J[?oV;O
function [out] = FT2Dc(u0); 33lh~+C
]lfufjj
[Nx, Ny] = size(1i,1j); RyX11XU
==?wG!v2 h
f1 = zeros(Nx,Ny); Q3l>xh
N7"cMAs\G
for ii = 1:Nx 5,MM`:{{
for jj = 1:Ny `;}qjm0a
f1(ii,jj) = exp(1i*pi*(ii + jj)); Xk%eU>d
end >ph=?MKD
end #@BhGB`9Qt
83V\O_7j
FT = fft2(f1.*in); n-M6~
!1R?3rVQS
out = f1.*FT; <(Ar[Rp
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%