a circle is divided using 2 by inscribing 2 circles how can we divide three regions obtained from it into equal 15 zones
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
AASHNA SUNEJA
le 22 Oct 2020
Réponse apportée : AASHNA SUNEJA
le 23 Oct 2020
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?
0 commentaires
Réponse acceptée
VBBV
le 23 Oct 2020
Modifié(e) : VBBV
le 23 Oct 2020
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
0 commentaires
Plus de réponses (2)
VBBV
le 23 Oct 2020
Modifié(e) : VBBV
le 23 Oct 2020
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
Voir également
Catégories
En savoir plus sur Unit Conversions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!