有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 <4D.P2ct
-n+=[M
2d centered Fourier transform,居中的傅里叶变换 "Lw[ $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4f'1g1@$
% Citation for this code and algorithm: auK*\Wjm?
% Tatiana Latychevskaia and Hans-Werner Fink )jm}h7,
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", bw&8"k>D?
% Appl. Optics 54, 2424 - 2434 (2015) [,yoFm%"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Gdb6 U{
% The code is written by Tatiana Latychevskaia, 2002 lN-vFna
% The version of Matlab for this code is R2010b l'y)L@|Qrh
Wz;7 |UC
function [out] = FT2Dc(u0); 'QeCJ5p]
[x{'NwP?
[Nx, Ny] = size(1i,1j); STtjkZ6
MV'q_{J
f1 = zeros(Nx,Ny); D!^&*Ia?2
R m>AU=
for ii = 1:Nx 33:{IV;k
for jj = 1:Ny _H}8eU
f1(ii,jj) = exp(1i*pi*(ii + jj)); 8{^zXJi]m
end "**Tw'
end 6F
!B;D -Q
o'+p,_y9Y@
FT = fft2(f1.*in); RoS&oGYqR
Na=.LW-ma=
out = f1.*FT; /m"O.17N
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%