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

atan2dR Documentation

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

Note

Note: If you have a radian (rad) angle value, use atan2 instead.

Author(s)

Rik Wehbring (GNU Octave atan2d), Irucka Embry

References

John W. Eaton, David Bateman, Søren Hauberg, and Rik Wehbring (November 2022). GNU Octave: A high-level interactive language for numerical computations: Edition 7 for Octave version 7.3.0. https://docs.octave.org/octave.pdf. Page 554.

Examples


library(iemisc)

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




iemisc documentation built on Sept. 25, 2023, 5:09 p.m.