有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 9i9'Rd`g
FA5|`
2d centered Fourier transform,居中的傅里叶变换 0v7#vZ
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% o2AfMSt.
% Citation for this code and algorithm: ^,-2";2Xh
% Tatiana Latychevskaia and Hans-Werner Fink c5 ^CWk K
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", ^/'zU,
% Appl. Optics 54, 2424 - 2434 (2015) hJ~Na\?w
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% f\p#3IwwH
% The code is written by Tatiana Latychevskaia, 2002 OKW}8 qM
% The version of Matlab for this code is R2010b 4gR;,%E\TO
j
p"hbV
function [out] = FT2Dc(u0); * A<vrkHz
B/Jz$D
[Nx, Ny] = size(1i,1j); "Zh3,
E`0mn7.t
f1 = zeros(Nx,Ny); asEk3
o]R*6$
for ii = 1:Nx ;?{[vLHDL
for jj = 1:Ny v3p'*81;
f1(ii,jj) = exp(1i*pi*(ii + jj)); (5rfeSA^
end G 6r2
"
end t,bQ@x{zVC
H18.)yHX
FT = fft2(f1.*in); LE@<)}Au^
0|i3#G_~
out = f1.*FT; WilKC|R]P
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%