Assume a piece of land in Hawaii is gifted to you by someone
Assume a piece of land in Hawaii is gifted to you by someone! The shape of the land is depicted in the figure below. It contains a rectangle, a circle and a triangle with the dimensions shown in the picture. For L=30 m and W=15 use Excel to calculate the area of the property. Your spreadsheet should allow you to quickly make changes to L and W and see what the new area is. Show what the result is when you select a different L and W value. Also write a Matlab script file name Land to find area of A.
Solution
MATLAB CODE
%calculate the area of land
L = input(\'length value in metres =\');
W = input(\'width value in metres=\');
%A= area of the land in m^2
A = (2*L*W) + ((1.5*W*2*L)/2) +((pi*(L/2)^2)/2)
