How to plot circles around centre points?
Show older comments
Hi, I woild like help with my plot. Each point p2...p9 (with p7 omitted) are cetnre points of circles of radius 250 and I would like to know how to include the circle in this plot to show their edges.
p1=zeros(1,1);
p2= 1i*500;
p3= 2i*500;
p4= p1+500*(cosd(30)+(1i*sind(30)));
p5= p2+500*(cosd(30)+(1i*sind(30)));
p6= p3+500*(cosd(30)+(1i*sind(30)));
p8= p5+500*(cosd(30)-(1i*sind(30)));
p9= p6+500*(cosd(30)-(1i*sind(30)));
s=[p2,p3,p4,p5,p6,p8,p9];
figure, scatter(real(s),imag(s));grid;
Also in p5 I have some random points within the circle radius (that may also exceed the radius) and I would also like to know how to add these on the plot
U_rad=rand(100,1)*(289-35)+35;
U=rand(100,1)*360;
U_pos=(p5+U_rad.*(cosd(U)+1i*sind(U)));
Accepted Answer
More Answers (1)
Image Analyst
on 29 Apr 2015
Did you try plot?
plot(real(s),imag(s), 'bo', 'MarkerSize', 20, 'LineWidth', 2);
grid on;
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!