Mapping Toolbox | ![]() ![]() |
Convert angles between different units
Syntax
Description
anglout = angledim(anglin,from
,to
) returns the value of the input angle anglin
, which is in units specified by the valid angle units string from
, in the desired units given by the valid angle units string to
. Valid angle units strings are:
'degrees' for decimal degrees 'radians' for radians 'dms' for degrees-minutes-seconds 'dm' for degrees-minutes
Examples
Convert from degrees to radians:
What is the difference between dms and dm? (best displayed in bank format)
format bank
angledim(23.45134,'degrees','dms')
ans =
2327.05
angledim(23.45134,'degrees','dm')
ans =
2327.00
The dm answer is the dms answer correctly rounded to whole minutes
(i.e., rounded based on 60 seconds per minute, not 100).
See Also
angl2str |
Convert angle values to strings |
azimuth |
Angular relationship between points |
deg2dms dms2rad deg2rad |
Direct angle conversion functions |
distdim |
Convert distance units |
timedim |
Convert time units |
![]() | angl2str | antipode | ![]() |