Main Content
dms2degrees
Convert degrees-minutes-seconds to degrees
Description
converts angles from degrees-minutes-seconds representation to values in degrees
which may include a fractional part (sometimes called “decimal
degrees”). angleInDegrees
= dms2degrees(DMS
)
Examples
Input Arguments
Output Arguments
Algorithms
For an input row with value [D M S]
, the output value will be
SGN * (abs(D) + abs(M)/60 + abs(S)/3600)
SGN
is 1 if D
, M
, and
S
are all nonnegative and -1 if the first nonzero element of
[D M S]
is negative. An error results if a nonzero element is
followed by a negative element.Version History
Introduced in R2007a