有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 vA_,TS#Bo
5)XUT`;'){
2d centered Fourier transform,居中的傅里叶变换 GIEQD$vy
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Ds"%=
% Citation for this code and algorithm: K1J |\!o
% Tatiana Latychevskaia and Hans-Werner Fink p
P@q
`
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", bLG7{qp
% Appl. Optics 54, 2424 - 2434 (2015) tT)s,R%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3GE;:;8B
% The code is written by Tatiana Latychevskaia, 2002 oH0g>E;
% The version of Matlab for this code is R2010b ,v})
xS12$ib ~G
function [out] = FT2Dc(u0); w%qnH e9
RN)XIf$@_
[Nx, Ny] = size(1i,1j); Nkj$6(N=zJ
KO8{eT9d
f1 = zeros(Nx,Ny); MF'Z?M
";7N$hWE
for ii = 1:Nx 8Snv, Lb`^
for jj = 1:Ny ^$'z#ZN1
f1(ii,jj) = exp(1i*pi*(ii + jj)); :$u[1&6
end *s 4Ym
end hR|xUp
+d=f_@i
FT = fft2(f1.*in); ps2j ]g
c]x-mj =
out = f1.*FT; Z ;rM@x
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%