## get angle and radian between two points

versión 3.0.0.0 (103 KB) por
Simple code for find angle between two points

392 descargas

Actualizada 24 Mar 2017

Ver licencia

The atan2 function is an extended version of the trigonometric inverse tangent function.
In the figure below, tan?=y/x, so tan-1y/x=?. The atan2 function just calculates tan-1y/x with y and x as separate parameters.
The reason it does so is to give a more accurate answer: since the tangent function is periodic,
there are multiple values of x and y that would appear to have the same angle (but do not).
Also, atan2 provides the correct values when y/x is undefined, such as at p/2.
%Input O-(x1,y1) and P-(x2,y2)points
%Output Angle
%devloper Er.Abbas Manthiri S
%Email-abbasmanthiribe@gmail.com

### Citar como

Abbas Manthiri S (2022). get angle and radian between two points (https://www.mathworks.com/matlabcentral/fileexchange/60148-get-angle-and-radian-between-two-points), MATLAB Central File Exchange. Recuperado .

##### Compatibilidad con la versión de MATLAB
Se creó con R2014a
Compatible con cualquier versión
##### Compatibilidad con las plataformas
Windows macOS Linux

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!