Navigation

Operators and Keywords

Function List:

C++ API

: deg = rad2deg (rad)

Convert radians to degrees.

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

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

Example:

rad2deg ([0, pi/2, pi, 3/2*pi, 2*pi])
  ⇒  0    90   180   270   360

See also: deg2rad.

Package: octave