Q:

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 ?

Thanks

A:

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).

