Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A fence around a field is shaped as shown in Figure P12. It consists of a rectan

ID: 1818297 • Letter: A

Question

A fence around a field is shaped as shown in Figure P12. It consists of a
rectangle of length L and width W, and a right triangle that is
symmetrical about the central horizontal axis of the rectangle. Suppose
the width W is known (in meters), and the enclosed area A is known
(in square meters). Write a user-defined function file with W and A as
inputs. The outputs are the length L required so that the enclosed area is
A, and the total length of fence required. Test your function for the
values W = 6m and A = 80m^2 .
SOLVE USING MATLAB.

Explanation / Answer

function[L,LT]=fence(W,A)

L=(4*tan(45*pi/180)*A-W.^2)/(4*tan(45*pi/180)*W)

LT=2*L+W+(W/sin(45*pi/180))

>>fence(6,80)

L=11.8333

PT=38.1519

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote