degrees2dm - Convert degrees to degrees-minutes
Syntax
DM = degrees2dm(angleInDegrees)
Description
DM = degrees2dm(angleInDegrees) converts
angles from values in degrees which may include a fractional part
(sometimes called "decimal degrees") to degree-minutes
representation. The input should be a real-valued column vector.
Given N-by-1 input, DM will be N-by-2, with one
row per input angle. The first column of DM contains
the "degrees" element and is integer-valued. The second
column contains the "minutes" element and may have a
nonzero fractional part. In any given row of DM,
the sign of the first nonzero element indicates the sign of the overall
angle. A positive number indicates north latitude or east longitude;
a negative number indicates south latitude or west longitude. Any
remaining elements in that row will have nonnegative values.
Example
angleInDegrees = [ 30.8457722555556; ...
-82.0444189583333; ...
-0.504756513888889;...
0.004116666666667];
dm = degrees2dm(angleInDegrees)
dm =
30.000000000000000 50.746335333336106
-82.000000000000000 2.665137499997741
0 -30.285390833333338
0 0.247000000000020
See Also
dm2degrees, degtorad degrees2dms, radtodeg
 | deg2km, deg2nm, deg2sm | | degrees2dms |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit