dd2dms

From DavinciWiki
Jump to: navigation, search

Description

Converts decimal degrees to degrees, minutes, and seconds

Arguments and Return Values

Parameters: One scalar input specifying decimal degrees

Return Value: A 3x1x1 array whose elements give the equivalent degrees, minutes, and seconds, respectively

Usage

Syntax: dd2dms(DD)

The input must be numeric and scalar.

Watch out for slight roundoff errors, especially if not using double-precision input.

When dd2dms() is entered without any arguments, it prints its description, as shown below.

Examples

dv> dd2dms()

Converts scalar decimal degrees to DMS array
dd2dms(DD) returns [D, M, S]
Input must be scalar
S.Marshall 10-02-2009

0
dv> dd2dms(180/pi)
3x1x1 array of double, bsq format [24 bytes]
57.0000000000000        17.0000000000000        44.8062470963623
dv> dd2dms(atod("-3.333333333333333333"))
3x1x1 array of double, bsq format [24 bytes]
-3.00000000000000       20.0000000000000        4.26325641456060e-13
dv> dd2dms(-1.5//1.5)

Input must be scalar

0

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Major Sub-Functions

Related Functions

Recent Library Changes

Created On: 11-18-2009
Modified On: 11-18-2009

Personal tools