Description Usage Arguments Details Value Author(s) Examples
angle2d
determines the angle between pairs of
coordinates in degrees or radians. The coordinates are
assumed to be in two-dimensional space.
1 |
coords1 |
An N \times 2 matrix of spatial coordinates. |
coords2 |
An N \times 2 matrix of spatial coordinates. |
radians |
A logical value indicating whether the
angles returned should be in degrees or radians. The
default is |
invert |
A logical value indicating whether the axes
of the coordinates should be inverted (i.e., the x- and
y-axis are switched). The default is |
Note that the angle is between the actual pairs of points, not the angle between the vectors extending from the origin to the points. e.g., the angle between (0, 1) and (1, 1) is 90 degrees, not 45. The sign of the direction not accounted for, e.g., a -135 degree angle is rotated by 180 degrees to become a 45 degree angle. All angles returned are in the interval [0, 180].
Returns a vector of angles.
Joshua French
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.