有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 Ym#io]
iV:\,<8d
2d centered Fourier transform,居中的傅里叶变换 93/`e}P"o
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% }tJMnq/m($
% Citation for this code and algorithm: r;O?`~2'4
% Tatiana Latychevskaia and Hans-Werner Fink EcPvE=^c
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", ppu<k N
% Appl. Optics 54, 2424 - 2434 (2015) _)~|Z~
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Q'[~$~&`
% The code is written by Tatiana Latychevskaia, 2002 _I%mY!x\`
% The version of Matlab for this code is R2010b _k5$.f:Yj<
xM>dv5<E
function [out] = FT2Dc(u0); )+.AgqxI
NJKk\RM@7
[Nx, Ny] = size(1i,1j); 6wb M$|yFj
nb@<UbabW}
f1 = zeros(Nx,Ny); {h;i x
II.Wa&w}
for ii = 1:Nx ">s0B5F7
for jj = 1:Ny Q8DKU
f1(ii,jj) = exp(1i*pi*(ii + jj)); ik0w\*
end U27ja|W^
end R xWD>:
^Cg@'R9
FT = fft2(f1.*in); n4
Y
]v
C,u;l~zz
out = f1.*FT; 87nsWBe
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%