Mapping Toolbox | ![]() ![]() |
Convert distinct matrix elements to hms format.
Syntax
Description
timeout = mat2hms(h,m,s) takes times separated into three inputs, one each for hours, minutes, and seconds, and converts them to single hms values.
timeout = mat2hms(h,m,s,n) specifies the power of 10, n
, to which the input seconds should be rounded before they are converted (i.e., if a result is 12.567 seconds, and n = -2, the resulting seconds output would be 12.57). The default value of n
is -2.
timeout = mat2hms([h,m,s],n) allows the inputs to be packed into a three-column matrix in which the columns represent hours, minutes, and seconds, respectively.
Examples
See Also
hms2mat |
Convert from hms to separated matrices |
![]() | mat2dms | mdistort | ![]() |