How can I fill in the area between two intersecting circles?

2 views (last 30 days)
I have two circles, one of radius = 2.5 centered at (0, -1), and the other of radius = 3 centered at (0, 1):
x = 0:0.01:2*pi;
y1 = plot(2.5*cos(x), 2.5*sin(x)-1, 'r');
hold on
y2 = plot(3*cos(x), 3*sin(x)+1, 'r');
I need to shade the intersection between them gray, but there's a catch; I can't use any toolboxes. So no patch or fill or area. Please help! Thanks.
  3 Comments
Justin D.
Justin D. on 9 Oct 2015
Thanks! So if those aren't part of a toolbox, then how could I fill in the intersection between those two circles?

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!