dd2dms
(New page (just NEED template)) |
(Copied and modified from cart2sph) |
||
Line 1: | Line 1: | ||
− | [[category: | + | {{DavinciWiki_Function| |
+ | Converts decimal degrees to degrees, minutes, and seconds | ||
+ | | | ||
+ | Parameters: One scalar input specifying decimal degrees | ||
+ | |||
+ | Return Value: A 3x1x1 array whose elements give the equivalent degrees, minutes, and seconds, respectively | ||
+ | | | ||
+ | [[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. | ||
+ | | | ||
+ | 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 | ||
+ | | | ||
+ | | | ||
+ | *[[abs]] | ||
+ | *[[floor]] | ||
+ | *[[sign]] | ||
+ | | | ||
+ | *[[s2dhms]] | ||
+ | | | ||
+ | | | ||
+ | 1.22 | ||
+ | | | ||
+ | | | ||
+ | }} | ||
+ | [[category:Functions]] | ||
+ | [[category:User Defined Functions]] | ||
+ | [[category:Math]] |
Latest revision as of 12:57, 18 November 2009
Contents: Description, Arguments, Usage, Examples, Sub-Functions, Related Functions, Source Supported Under Version: > 1.22
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
All other topics
Related Functions
Recent Library Changes Created On: 11-18-2009 |