有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 U5Q `r7
[q?{e1
2d centered Fourier transform,居中的傅里叶变换 +'N?`l6<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% =sG C
% Citation for this code and algorithm: /V2Ih
% Tatiana Latychevskaia and Hans-Werner Fink k,0JW=Vh>|
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", hof:36 <
% Appl. Optics 54, 2424 - 2434 (2015) R}#?A%,*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% <I&X[Sqp
% The code is written by Tatiana Latychevskaia, 2002 J3oH^
% The version of Matlab for this code is R2010b TF^Rh4
&+xNR2";
function [out] = FT2Dc(u0); {Ymn_
ss-{l+Z5
[Nx, Ny] = size(1i,1j); qYl%v
2x"&8Bg3
f1 = zeros(Nx,Ny); ido'<;4>
W+cmn )8
for ii = 1:Nx }~:`9PV)Z%
for jj = 1:Ny MIsjTKE
f1(ii,jj) = exp(1i*pi*(ii + jj)); ^}a..@|%W
end BB.^-0up
end MQG(n +c
!.?2zp~
FT = fft2(f1.*in); N41)?-7F
lSPQXu*[
out = f1.*FT; -S"YEH9
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%