计算全息close all clc clear A=zeros(64) A(15:20,20:40)=1 A(15:50,20:25)=1 A(45:50,20:40)=1 A(30:34,20:35)=1 % ppp=exp(rand(64)*pi*2*i) A=A.*ppp % Author s email: zjliu2001@163.com figure imshow(abs(A),[]) Fa=fft2(fftshift(A)) Fs=fftshift(Fa) Am=abs(Fs) % amplitude Ph=angle(Fs) % phase s=11 % 这表示边长吗? cgh=zeros(64*s) th=max(max(abs(Fs)))