% This M-File calculates the width of the base of the tree
% Written by Michael Haggerty
stringLength = input('Enter a string length: ');
poleHeight = 15;
treeWidth = 2 * sqrt(stringLength.^2 - poleHeight.^2);
string = ['The width of the base of tree is ' num2str(treeWidth)];
disp(string);