Jessy
Jessy

Reputation: 15661

How to find the angle of triangle in MATLAB

I'm trying to find the angle of the the triangle in MATLAB.

e.g. in the triangle below, I want to find the angle of ABC (marked as black). if a = 40, b=50, How I can I find the angle (in degree) of ABC in MATLAB ? alt text

Thanks

Upvotes: 1

Views: 6645

Answers (1)

Pieter
Pieter

Reputation: 2912

In a right angled triangle, the tangent of of the acute angles can be find by taking the ratio of side opposed to the angle and side it shares with the right angle. These correspond to your values a and b. Then you have to take the inverse tangent of this ratio. This results in atan(a/b).

Upvotes: 3

Related Questions