有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 |41~U\
CQ{pv3)
2d centered Fourier transform,居中的傅里叶变换 uesIkJ^Q[
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% a0k/R<4
% Citation for this code and algorithm: d|sf2
% Tatiana Latychevskaia and Hans-Werner Fink Nc^:v/(P
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", #A~7rH%hi
% Appl. Optics 54, 2424 - 2434 (2015) JGYJ;j{E]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !Ks<%;
rb
% The code is written by Tatiana Latychevskaia, 2002 GG4FS
% The version of Matlab for this code is R2010b `Gg,oCQg
(s51GRC
function [out] = FT2Dc(u0); Eh *u6K)Z
yx<-M
[Nx, Ny] = size(1i,1j); 5^{2g^jH6
j^/^PUR
f1 = zeros(Nx,Ny); B?d+^sz]
"JgwL_2
for ii = 1:Nx 8%Ak
for jj = 1:Ny A*kN
I
f1(ii,jj) = exp(1i*pi*(ii + jj)); i2)$%M&
end rLp0)Go
end =Nz;R2{@
+^$E)Ol
FT = fft2(f1.*in); a!&<jM
t&o&gb
out = f1.*FT; b:x~Jz#%2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%