deg2rad

Converts degrees to radian values.

Syntax

r = deg2rad(d)

Inputs

d
Any valid scalar | vector | matrix in degrees.
Type: double
Dimension: scalar | vector | matrix

Outputs

r
The radian value.
scalar | vector | matrix

Examples

Scalar input:
r = deg2rad(30)
r = 0.52359878
Matrix input:
r = deg2rad([30, 60; 0, 180])
r = [Matrix] 2 x 2
0.52359878  1.04719755
0.00000000  3.14159265