Problem 336. Similar Triangles - find the height of the tree

Given the height, h1, of a power pole, shorter than a tree, a given distance, x2 away, please find h2, height of the tree. Please note that the angle, phi, is the acute angle measured from the ground to an observer's line of sight aimed to the sucessive peaks of the power pole and the tree, in that order. Also the distance from the observer to the power pole is x1, also a given. x2 is the distance between the tree and the power pole. In all tests x1 is always a multiple of x2.

Inputs: h1, x1, x2

Output: h2

HINT: find phi, given h1 and x1. Phi may be measured in degrees or radians. Note that default trig functions in MATLAB operate in radians.

EX: x1 = 4; x2 = 4; h1 = 3;




Solution Stats

69.29% Correct | 30.71% Incorrect
Last solution submitted on May 18, 2017

Problem Comments

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!