有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 D^W?~7e^r
Gn%gSH/
2d centered Fourier transform,居中的傅里叶变换 dsJHhsu6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% UHW;e}O5
% Citation for this code and algorithm: :i ft{XR'
% Tatiana Latychevskaia and Hans-Werner Fink Q!dNJQpb
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", obhq2sK
% Appl. Optics 54, 2424 - 2434 (2015) j(maj
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /R44x\nhr
% The code is written by Tatiana Latychevskaia, 2002 $I-i=:}g
% The version of Matlab for this code is R2010b a7UfRG
/IN/SZx
function [out] = FT2Dc(u0); 3xnu SOdh
Pkw` o #
[Nx, Ny] = size(1i,1j); @7aSq-(_l*
,:QDl
f1 = zeros(Nx,Ny); +e%U6&l{
s8<)lO<SV.
for ii = 1:Nx /N&)r wc
for jj = 1:Ny e.IKmH]z
f1(ii,jj) = exp(1i*pi*(ii + jj)); ]o]*&[C
end h .Iscr^~
end ?"[h P=3J
va/$dD9
FT = fft2(f1.*in); ard<T}|N
SlZ>N$E
out = f1.*FT; *!*J5/b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%