tand: Tangent (in degrees) [GNU Octave/MATLAB compatible]

tandR Documentation

Tangent (in degrees) [GNU Octave/MATLAB compatible]

Description

Calculates the value of tangent for each element of x in degrees in a manner compatible with GNU Octave/MATLAB. Zero is returned for any "elements where x / 180 is an integer and Inf for elements where (x - 90) / 180 is an integer." Reference: Eaton.

Usage

tand(x)

Arguments

x

A numeric vector containing values in degrees

Value

The tangent of each element of x in degrees. Zero for any "elements where x / 180 is an integer and Inf for elements where (x - 90) / 180 is an integer."

Note

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

Author(s)

David Bateman (GNU Octave tand), 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 553.

Examples


library(iemisc)

# Examples from GNU Octave tand
tand(seq(10, 80, by = 10))

tand(c(0, 180, 360))

tand(c(90, 270))



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