有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 #`"B
YFV[E
Yt4v}{+
2d centered Fourier transform,居中的傅里叶变换 Uf$IH!5;Z
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% wo^1%:@/2
% Citation for this code and algorithm: W*4!A\K
% Tatiana Latychevskaia and Hans-Werner Fink <)@^TRS
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", uQWd`7
% Appl. Optics 54, 2424 - 2434 (2015) O}7aX '
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ]d&;QZ#w
% The code is written by Tatiana Latychevskaia, 2002
"M]`>eixL
% The version of Matlab for this code is R2010b MpJx>0j/J
U(:t$SBKy
function [out] = FT2Dc(u0); #-d-zV*
+,9Muf h
[Nx, Ny] = size(1i,1j); A?c?(~9O
Z,b^f
Vw
f1 = zeros(Nx,Ny); HL!" U(_
P$G|o|h
for ii = 1:Nx ;Y(~'KF
for jj = 1:Ny 7|?Ht]
f1(ii,jj) = exp(1i*pi*(ii + jj)); 89A04HX
end Ob-k`@_|
end UAdj[m61
sF#t{x/sW
FT = fft2(f1.*in); @(rLn
y? 65*lUl
out = f1.*FT; [dXRord
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%