iemisc (version 0.9.8)

tand: 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." Source: 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."

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 tand
tand(seq(10, 80, by = 10))

tand(c(0, 180, 360))

tand(c(90, 270))


# }

Run the code above in your browser using DataCamp Workspace