资源简介
该文件详细的模拟再现了计算全息的过程,并注有详细的注释,适应于学习物理光学的人
代码片段和文件信息
close;
clc;
clear all;
A = zeros(64);
A(15:2020:40) = 1;
A(15:5020:25) = 1;
A(45:5020:40) = 1;
A(30:3420:35) = 1;
figure;
imshow(abs(A)[]);
Fa = fft2(fftshift(A));
Fs = fftshift(Fa);
Am = abs(Fs);%幅度
Ph = angle(Fs);%相位
s = 11;
cgh = zeros(64*s);
th = max(max(abs(Fs)));
qq = th/1.2;
Am(Am>qq) = qq;
q = 1:s;
w = (s+1)/2;
for m = 1:64
for n = 1:64
- 上一篇:两电平SVPWM的MATLAB实现
- 下一篇:车牌识别MATLAB算法
评论
共有 条评论