% Created on October 3, 2007. % File Finding_Length: Computes the length(L) and the total lenth % given the area and the width and distane. See figure P12. % Imput variables: % W = Width of the figure % A = Area of the figure % Output variables: % L = Length of figure % L_Total = Total lenght of the fence required
W = input('Width value: ') A = input('Total area: ')
Error using ==> input Cannot call INPUT from EVALC.
L = (A - (W*cos(pi/4))^2/2)/W L_Total = W + 2*L + 2*W*cos(pi/4)
disp('Length of fence requred: ') disp(L) disp('Total length of fence requred: ') disp(L_Total)