有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 (SF1y/g@=
vX+.e1m
2d centered Fourier transform,居中的傅里叶变换 WL l_'2h
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% h4(JUio
% Citation for this code and algorithm: :a.0hes
% Tatiana Latychevskaia and Hans-Werner Fink @9 )}cg
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", dQ9
ah
% Appl. Optics 54, 2424 - 2434 (2015) d&jjWlHgEN
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% :y#T9R9
% The code is written by Tatiana Latychevskaia, 2002 < Dd%
% The version of Matlab for this code is R2010b !v9lk9SV
=Vb~s+YW
function [out] = FT2Dc(u0); z(me@P!D~
J &YQ]l
[Nx, Ny] = size(1i,1j); \"x>JW4w
O*G1 QX
f1 = zeros(Nx,Ny); @2
=z}S3O
Oz{%k#X-
for ii = 1:Nx #Fs|f3-@
for jj = 1:Ny #Qh>z%Mn^3
f1(ii,jj) = exp(1i*pi*(ii + jj)); :.uk$jx
end yNa;\UF
end `T"rG}c
J}TfRrf
FT = fft2(f1.*in); YEv
Lhh
=eBmBn
out = f1.*FT; 3;_
n{&
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%