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 from angle units to desired angle units


convertedValues = convang(valuesToConvert, inputAngleUnits, outputAngleUnits)


convertedValues = convang(valuesToConvert, inputAngleUnits, outputAngleUnits) computes the conversion factor from specified input angle units to specified output angle units. It then applies the conversion factor to the input to produce the output in the desired units. inputAngleUnits and outputAngleUnits are character vectors or strings.

Input Arguments


Floating-point array of size m-by-n values the function is to convert. All values must have the same unit conversions from inputAngleUnits to outputAngleUnits.


Specified input angle units. Supported units are:



Specified output angle units. Supported units are:


Output Arguments


Floating-point array of size m-by-n values that the function has converted.


Convert three angles from degrees to radians:

a = convang([3 10 20],'deg','rad')

a =

    0.0524    0.1745    0.3491

Introduced in R2006b