deg2rad
Converts angles from degrees to radians.
Category: Mathematics > Elementary Math
Syntax
Y = deg2rad(X)
Multiplies each element of X by pi/180.
Description
deg2rad(X) is the same as X*pi/180. The inverse is rad2deg. Remember that sin, cos and tan expect radians, while sind, cosd and tand expect degrees.
Input arguments
X- Numeric array of any size.
Output arguments
Y- Array of the same size as
X, in radians.
Example
Degrees to radians
deg2rad([0 90 180 360])
Output
ans = 1×4
0 1.5708 3.1416 6.2832