Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

degtorad

Convert angles from degrees to radians

degtorad is not recommended and may be removed in a future release. Instead, use deg2rad.

Syntax

angleInRadians = degtorad(angleInDegrees)

Description

angleInRadians = degtorad(angleInDegrees) converts angle units from degrees to radians. This is both an angle conversion function and a distance conversion function, since arc length can be a measure of distance in either radians or degrees, provided that the radius is known.

Examples

Show that there are 2π radians in a full circle:

2*pi - degtorad(360)

ans =
     0

Introduced in R2009b

Was this topic helpful?