1求在一个圆内均匀分布n个点的坐标,用matlab怎么实现

如题所述

等面积分布,就是把圆分成很多块面积相等的区域
n=360;
R=5;
t=0:0.02:2*pi;
plot(R*cos(t),R*sin(t),'r');
axis square
hold on
r=R*sqrt(rand(1,n));
seta=2*pi*rand(1,n);
x=r.*cos(seta);
y=r.*sin(seta);
plot(x,y,'*')
如果是等角度等半径.会感觉中心会比上面那个图很密.
n=360;
R=5;
t=0:0.02:2*pi;
plot(R*cos(t),R*sin(t),'r');
axis square
hold on
r=R*rand(1,n);
seta=2*pi*rand(1,n);
x=r.*cos(seta);
y=r.*sin(seta);
plot(x,y,'*')
温馨提示:答案为网友推荐,仅供参考
第1个回答  2021-01-26

本视频展示如何用matlab绘制散圆状态图,可用于相关科研数据绘图!

相似回答