Mapping Toolbox
  Go to function:
    Search    Help Desk 
hms2mat    Examples   See Also

Convert the elements of hms format to distinct matrix elements

Syntax

Description

[h,m,s] = hms2mat(timein) takes times in hms format and splits their components into three outputs, one each for hours, minutes, and seconds.

[h,m,s] = hms2mat(timein,n) specifies the power of 10, n, to which the resulting seconds output should be rounded (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 -5.

matout = hms2mat(timein,n) returns a three-column matrix, matout, in which the columns represent hours, minutes, and seconds, respectively. In this case, timein must be a vector.

Examples

See Also

mat2hms
Convert from separated matrices to hms format


[ Previous | Help Desk | Next ]