Determine the most efficient shape (defined by the shape with largest ratio of area to its perimeter) for a large fenced in garden.
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (1개)
KSSV
2017년 10월 16일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Object Properties에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!