MATLAB: How can you maximize area of a rectangle given a total perimeter

areamaximizerectangular

If you have 30 fence panels each with 1 meter width, how should you arrange them to maximize the area of the rectangle? Write a program that does this for you. And the panels cannot be broken, they have to stay whole.

Best Answer

Try to make it a square, as square will have the maximum area for the given perimeter. If creating is not possible try to make the sides difference as minimum as possible. So as you mentioned 30 fence are available so the 7.5 would be the best but as we can not broke the fence i half then 7 fence at one side and 8 fence at other side will be the best option for this.
Related Question