Ask your own question, for FREE!
Mathematics 20 Online
OpenStudy (anonymous):

Have a look please. I made a Matlab code for giving solution to the following problem: A regular polygon of n sides is inscribed in a circle of radius r=1.33. Considering this polygon to consist of identical triangles, calculate the area and perimeter of the polygon for n=6, n=60 and n=600. Also Calculate the perimeter and area of the circle for comparison.

OpenStudy (anonymous):

Code: function [area] = ntri(n) r=1.33; circleP=2*pi*r % area= (cos(pi-(pi)/n-degtorad(90))*(sin(pi-(pi)/n-degtorad(90)))/2 % % perimeter=cos(pi-(pi)/n-degtorad(90))*r %determination of hip adjacent angle Had=pi-(pi)/n-degtorad(90); %Determination of the base base=cos(Had)*r; %Hight H=sin(Had)*r; %area of one triangle area1= base*H; %area of all triangles triangles_area=area1*n

OpenStudy (anonymous):

It outputes this: >> ntri(6) circleP = 8.3566 triangles_area = 4.5957 >> ntri(60) circleP = 8.3566 triangles_area = 5.5470 >> ntri(600) circleP = 8.3566 triangles_area = 5.5571

OpenStudy (anonymous):

you think the calculations are correct?

OpenStudy (phi):

the area of the triangles and their perimeter should be much closer to the circles for n=600

OpenStudy (phi):

to debug this, figure out by hand what the area of one triangle is for n=600 and compare that to what your program finds

OpenStudy (anonymous):

I did by hand too. I'm just not sure if i got the calculation right...

OpenStudy (phi):

|dw:1373226732533:dw|

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!