this code will generate points in a particular area
n=10; % number of points that you want
center = [2 ,2]; % center coordinates of the circle [x0,y0]
radius = 10; % radius of the circle
angle = 2*pi*rand(n,1); r = radius*sqrt(rand(n,1)); X = r.*cos(angle)+ center(1); Y = r.*sin(angle)+ center(2); plot(X,Y,'.r')
and here is the circle can be drawn as…
center = [2 ,2]; % center coordinates of the circle [x0,y0] radius = 10; % radius of the circle angle = 0:.01:2*pi; r = radius; X = r.*cos(angle)+ center(1); Y = r.*sin(angle)+ center(2); plot(X,Y,'.r')
Problem is that I want to plot circles around each point which are lying inside a given circle. Please help
Best Answer