渐变周期振幅光栅clear;close all;clc;
g=ones(1080,1080);[m,n]=size(g);Lx=10801010-6;Ly=1080*10*10-6;lamda=6.3210(-7);k=2*pi/lamda;x0=linspace(-Lx/2,Lx/2,m);y0=linspace(-Ly/2,Ly/2,n);[x,y]=meshgrid(x0,y0);[theta,r]=cart2pol(x,y);T0=0.35*10-3;n2=0.025;T=cos(2pi*x./(T0+n2.*y));%以下代码为修改for i=1:1080 for j=1:1080 if T(i,j)>0 T(i,j)=1; else T(i,j)=0; end end endfigure;imshow(T,[]);
11-08
11-08