iemisc (version 0.9.8)

atan2d: "Two-argument arc-tangent" (in degrees) [GNU Octave/MATLAB compatible]

Description

Calculates the value of the "two-argument arc-tangent" for each element of (y, x) in degrees in a manner compatible with GNU Octave/MATLAB.

Usage

atan2d(y, x)

Arguments

y

A numeric vector containing values in degrees

x

A numeric vector containing values in degrees

Value

The "two-argument arc-tangent" of each element of (y, x) in degrees. Note: "The arc-tangent of two arguments atan2(y, x) returns the angle between the x-axis and the vector from the origin to (x, y), i.e., for positive arguments atan2(y, x) == atan(y/x)." Source: Trig (base).

References

John W. Eaton, David Bateman, and S<U+00F8>ren Hauberg (2009). GNU Octave version 3.0.1 manual: a high-level interactive language for numerical computations. CreateSpace Independent Publishing Platform. ISBN 1441413006, URL http://www.gnu.org/software/octave/doc/interpreter/. Page 358.

Examples

Run this code
# NOT RUN {
library("iemisc")

# Examples from GNU Octave atan2d
atan2d (a <- seq(-1, 1, by = 0.1), b <- seq(1, -1, by = -0.1))




# }

Run the code above in your browser using DataLab