a circle is divided using 2 by inscribing 2 circles how can we divide three regions obtained from it into equal 15 zones

a = linspace(0, 2*pi, 100);
r1 = 100;
r2=58;
r3=25;
x = r1*cos(a);
y = r1*sin(a);
x1 = r2*cos(a);
y1 = r2*sin(a);
x2 = r3*cos(a);
y2 = r3*sin(a);
N=10
N1=4
figure(1)
plot(x, y,'k')
hold on
plot(x1, y1,'r')
plot([zeros(1,N); x(1:10:end)], [zeros(1,N); y(1:10:end)])
plot(x2, y2,'b')
hold off
axis equal
From this code I have been able to divide a single circle to 3 areas with centeral region a circle and rest two are tube shaped area then I want to divide area except the central circular area to 14 equal zones. how can i do this?

 Accepted Answer

See the fig attached, is the same figure you want, if i understand it right
N = 4; % divides to 4 parts
N1 = 10;
a = linspace(0, 2*pi, N*10);
a1 = linspace(0,2*pi, N1*10);
r1 = 100;
r2=58;
r3=25;
x = r1*cos(a1);
y = r1*sin(a1);
x1 = r2*cos(a1);
y1 = r2*sin(a1);
x2 = r3*cos(a);
y2 = r3*sin(a);
figure(1)
plot(x, y,'k')
hold on
plot([x1(1:10:end);x(1:10:end)], [y1(1:10:end);y(1:10:end)])
hold on
x1 = r2*cos(a);
y1 = r2*sin(a);
plot(x1, y1,'r')
plot([x2(1:10:end); x1(1:10:end)], [y2(1:10:end); y1(1:10:end)])
plot(x2, y2,'b')
hold off
axis equal

More Answers (2)

Try this . it works , change the value of N to number of equal parts you want
N = 15; % divides to 15 parts
a = linspace(0, 2*pi, N*10);
r1 = 100;
r2=58;
r3=25;
x = r1*cos(a);
y = r1*sin(a);
x1 = r2*cos(a);
y1 = r2*sin(a);
x2 = r3*cos(a);
y2 = r3*sin(a);
figure(1)
plot(x, y,'k')
hold on
plot(x1, y1,'r')
plot([zeros(1,N); x(1:10:end)], [zeros(1,N); y(1:10:end)])
fill(x2, y2,'w')
hold off
axis equal

1 Comment

Thank you Vashishta for the help. Actually I want to divide the 2 annular regions in this separately into 14 zones. the smaller annular region want it to be divided into 4 equal zones and the bigger annular region into 10 equal zones and the central circular region remains the same.
Many thanks in advance

Sign in to comment.

Many thanks Vashishta
I want a smilar sort of figure. I am attaching the figure I want and what I want to do exactly. I want to fill each of these 15 zones according to the experimental value I have. I have tried dowing that by changing the polar cordinates to the cartesian cordinates. But I am not getting the exact results.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Asked:

on 22 Oct 2020

Answered:

on 23 Oct 2020

Community Treasure Hunt

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

Start Hunting!