This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Convert angle from radians to degrees


D = rad2deg(R)



D = rad2deg(R) converts angle units from radians to degrees for each element of R.


collapse all

Convert pi into degrees.

D = rad2deg(pi)
D = 180

Specify the mean radius of Earth and the distance from Munich to Bangalore measured along the Earth's surface (in kilometers). Compute the spherical distance between Munich and Bangalore in degrees.

dist = 7194;
radEarth = 6371;
R = dist/radEarth;
D = rad2deg(R)
D = 64.6972

Input Arguments

collapse all

Angle in radians, specified as a scalar, vector, matrix, or multidimensional array. If R contains complex elements, rad2deg converts the real and imaginary parts separately.

Data Types: single | double
Complex Number Support: Yes

Output Arguments

collapse all

Angles in degrees, returned as a scalar, vector, matrix, or multidimensional array. D is the same size as R.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

See Also

Introduced in R2015b