Navigation

Operators and Keywords

Function List:

C++ API

: rad = deg2rad (deg)

Convert degrees to radians.

The input deg must be a scalar, vector, or N-dimensional array of double or single floating point values. deg may be complex in which case the real and imaginary components are converted separately.

The output rad is the same size and shape as deg with degrees converted to radians using the conversion constant pi/180.

Example:

deg2rad ([0, 90, 180, 270, 360])
  ⇒  0.00000   1.57080   3.14159   4.71239   6.28319

See also: rad2deg.

Package: octave