Determine the most efficient shape (defined by the shape with largest ratio of area to its perimeter) for a large fenced in garden.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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?
0 comentarios
Respuestas (1)
KSSV
el 16 de Oct. de 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.
0 comentarios
Ver también
Categorías
Más información sobre Graphics Object Properties en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!