rohit543
Newbie level 3
Dear fellows.
I have to make M points in a circle with radius 0.1R\[\leqslant\]d\[\leqslant\] 0.5R.
I have the code for circle but not getting the meaning of 0.1d and 0.5d
I have code for circle as follows.
I have to make M points in a circle with radius 0.1R\[\leqslant\]d\[\leqslant\] 0.5R.
I have the code for circle but not getting the meaning of 0.1d and 0.5d
I have code for circle as follows.
Code:
% Data
n = 10;
radius = rand;
xc = randn;
yc = randn;
% Engine
theta = rand(1,n)*(2*pi);
r = sqrt(rand(1,n))*radius;
x = xc + r.*cos(theta);
y = yc + r.*sin(theta);
% Check
plot(x,y,'.')
% Bruno
Last edited by a moderator: