有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 LQS*/s0
QoW3*1o
2d centered Fourier transform,居中的傅里叶变换 xq]&XlA:ug
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% E85 03
% Citation for this code and algorithm: 6v1j*'
% Tatiana Latychevskaia and Hans-Werner Fink d*G$qUiX
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", [C&c;YNp
% Appl. Optics 54, 2424 - 2434 (2015) 'R$~U?i8
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% nQgn^z#
% The code is written by Tatiana Latychevskaia, 2002 n[clYi@e
% The version of Matlab for this code is R2010b %GIla*
$SDx)
'!
function [out] = FT2Dc(u0); ="4jk=on
z4<h)hh"k6
[Nx, Ny] = size(1i,1j); 6-^+btl)#
;S%wPXj&
f1 = zeros(Nx,Ny); $51#xe
:4A^~+J
for ii = 1:Nx k4|YaGhf
for jj = 1:Ny zL{KK9Or
f1(ii,jj) = exp(1i*pi*(ii + jj)); U-Iwda8v
end &Y,Rm78
end ,5/gNg
i7p3GBXh[
FT = fft2(f1.*in); UOwj"#
)oNomsn
out = f1.*FT; "#OmmU<U
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%