Home > air_sea > 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.

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 % 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 Thu 26-Apr-2007 12:23:13 by m2html © 2003