%% 生成均匀点标靶
%% **********1.准备工作**********
clc;clear;close all;
%%%%%%%%%%%%%%%%%%%%%%% 均匀散点圆 %%%%%%%%%%%%%%%%%%%%%%%%%%
my0=1080; % 大圆平面分辨率
len_num=10; % 子孔径数量
my1=my0/len_num; % 子孔径分辨率
[xx,yy]=meshgrid(-(my0-1)/2
my0-1)/2,-(my0-1)/2
my0-1)/2);
[xx1,yy1]=meshgrid(-(my1-1)/2
my1-1)/2,-(my1-1)/2
my1-1)/2);
I0 = zeros(my0,my0);
Aperture1=sign(1-sign(xx1.^2+yy1.^2-((my1-1)./3).^2)); % 子孔径圆形孔径
dr = my0/len_num; %增量
% 生成等间距矩形
particle_x = linspace(0,my0,len_num+1)+my1/2;
particle_x = particle_x(1:len_num);
particle_y = particle_x;
for(i = 1 : length(particle_x))
for(j= 1 : length(particle_y))
d=((particle_x(i)-my0/2)^2 + (particle_y(j)-my0/2)^2)^(1/2); %均匀点到大圆圆心的距离
if(d > my0/2)
continue;
else
I0(particle_x(i)-my1/2+1:particle_x(i)+my1/2,particle_y(j)-my1/2+1:particle_y(j)+my1/2)=Aperture1;
end
end
end
figure
imagesc(I0);colormap('gray')
axis equal
axis off
运行结果