Convert angle from radians to degrees
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
R— Angle in radians
Angle in radians, specified as a scalar, vector, matrix, or
multidimensional array. If
R contains complex elements,
the real and imaginary parts separately.
Complex Number Support: Yes
D— Angle in degrees
Angles in degrees, returned as a scalar, vector, matrix, or
D is the same size as
This function fully supports tall arrays. For more information, see Tall Arrays.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox).