Determine the most efficient shape (defined by the shape with largest ratio of area to its perimeter) for a large fenced in garden.

2 views (last 30 days)
Create a vector containing the ratios of the area of a circle to the perimeter for circle for radius r values ranging from 50 to 100 by 2s. Do the same thing for the ratios of the area and perimeter of a square with side length r values ranging from 50 to 100 by 2s. Do the same thing for the ratios of the area and perimeter of an equilateral triangle with side length r values ranging from 50 to 100 by 2s. Finally, plot the three vectors of ratios on the same graph, x-axis is the r vector, y-axis is the ratio of area to perimeter vector. Use different colors or symbols for each plot, label the axes, and add a legend. Which shape is most efficient for which values of r?

Answers (1)

KSSV
KSSV on 16 Oct 2017
It is an Home Work problem....you have to learn matlab and do it on your own. I am showing it for ciecl, you can proceed like this for other cases.
% for circle
r = 50:100; % create radii
A = pi*r.^2 ; % Area of circle
C = 2*pi*r ; % perimeter of circle
R = A./C ; % ratio
YOu can use plot to plot the data you want.

Categories

Find more on Graphics Object Properties in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!