Home > atmlab > time > hms2sec.m

hms2sec

PURPOSE ^

HMS2SEC Convert from hours, minutes and seconds to seconds.

SYNOPSIS ^

function sec = hms2sec(hour, minute, second)

DESCRIPTION ^

HMS2SEC  Convert from hours, minutes and seconds to seconds.

   HMS2SEC(HOUR, MINUTE, SECOND) converts the number of hours, minutes and
   seconds to seconds.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

hms2sec.m

SOURCE CODE ^

0001 function sec = hms2sec(hour, minute, second)
0002 %HMS2SEC  Convert from hours, minutes and seconds to seconds.
0003 %
0004 %   HMS2SEC(HOUR, MINUTE, SECOND) converts the number of hours, minutes and
0005 %   seconds to seconds.
0006 
0007 %   Author:      Peter J. Acklam
0008 %   Time-stamp:  2003-06-22 19:22:49 +0200
0009 %   E-mail:      pjacklam@online.no
0010 %   URL:         http://home.online.no/~pjacklam
0011 
0012    sec = second + 60 * minute + 3600 * hour;

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005