有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 5e+j51
n>}Y@{<]/
2d centered Fourier transform,居中的傅里叶变换 >T[/V3Z~K
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% s-IE}I?;
% Citation for this code and algorithm: ~Y/A]N86,
% Tatiana Latychevskaia and Hans-Werner Fink OV]xo8a;
% "Practical algorithms for simulation and reconstruction of digital in-line holograms",
^f,4=-
% Appl. Optics 54, 2424 - 2434 (2015) 8@rYT5e3c
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% `a&L
% The code is written by Tatiana Latychevskaia, 2002 X_2N9$},
% The version of Matlab for this code is R2010b Y_Gd_+oJ
3wv@wqx
function [out] = FT2Dc(u0); b23A&1X
NAD^10
[Nx, Ny] = size(1i,1j); BsFO]F5mmX
%f'pAc|#
f1 = zeros(Nx,Ny); B!Wp=9)G
tKt}]KHV
for ii = 1:Nx ytY\&m
for jj = 1:Ny +S{m!j%B
f1(ii,jj) = exp(1i*pi*(ii + jj)); E,m|E]WP
end ~
=u8H
end !kSemDC
iAH,f5T
FT = fft2(f1.*in); &^$@LH3
GUu8 N
out = f1.*FT; w<B
S
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%