Home > timeplt > s2hms.m

s2hms

PURPOSE ^

S2HMS: converts seconds to interger hour, minute, and seconds.

SYNOPSIS ^

function [hr,min,sec]=s2hms(secs)

DESCRIPTION ^

 S2HMS: converts seconds to interger hour, minute, and seconds.
 [hr,min,sec]=S2HMS(secs) converts seconds to integer hour, minute,
 and seconds.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 3/11/96: version 1.0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 Rich Signell (rsignell@usgs.gov)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [hr,min,sec]=s2hms(secs)
0002 % S2HMS: converts seconds to interger hour, minute, and seconds.
0003 % [hr,min,sec]=S2HMS(secs) converts seconds to integer hour, minute,
0004 % and seconds.
0005 %
0006 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0007 % 3/11/96: version 1.0
0008 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0009 %
0010 % Rich Signell (rsignell@usgs.gov)
0011 
0012 sec=round(secs);
0013 hr=floor(sec./3600);
0014 min=floor(rem(sec,3600)./60);
0015 sec=round(rem(sec,60));

Generated on Wed 30-Nov-2005 15:41:21 by m2html © 2003