Home > matutils > dateconv > 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.
University of Maine Ocean Modelling Group http://rocky.umeoce.maine.edu/hjx/courses/SMS585/my2.5/air_sea/ 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 3/11/96: version 1.0
 8/5/99: version 2.0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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 %University of Maine Ocean Modelling Group http://rocky.umeoce.maine.edu/hjx/courses/SMS585/my2.5/air_sea/
0006 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0007 % 3/11/96: version 1.0
0008 % 8/5/99: version 2.0
0009 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0010 
0011 sec=round(secs);
0012 hr=floor(sec./3600);
0013 min=floor(rem(sec,3600)./60);
0014 sec=round(rem(sec,60));
0015

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005