有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 ,aWfGh#$
jAt65a
2d centered Fourier transform,居中的傅里叶变换 #lVSQZO~a
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %ULd_ES^
% Citation for this code and algorithm: 0Z%<H\Z
% Tatiana Latychevskaia and Hans-Werner Fink 71&`6#
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", WFeaX7\b
% Appl. Optics 54, 2424 - 2434 (2015) Yic'p0<
?V
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% yCg>]6B
% The code is written by Tatiana Latychevskaia, 2002 H~hAm
% The version of Matlab for this code is R2010b S;vZXgyN?
WWTJ%Rd|
function [out] = FT2Dc(u0); 9*|An
@qJv
[Nx, Ny] = size(1i,1j); m}
=<@b:l
6d 8n1_
f1 = zeros(Nx,Ny); ~b4fk^u`+
J_|>rfW
for ii = 1:Nx pk=z<OTb
for jj = 1:Ny }Ty_} 6a5
f1(ii,jj) = exp(1i*pi*(ii + jj)); .Qj`_q6=
end ] @1ncn7N
end eP3 itrH(
\=~<I
FT = fft2(f1.*in); :(x 90;DW
`+@%l*TQ
out = f1.*FT; )=D9L
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%