Seconds to hours, minutes, seconds

版本 1.4.0.0 (1.5 KB) 作者: Simon Robinson
Converts a time in seconds to a time in hours, minutes and seconds.
5.1K 次下载
更新时间 2009/2/2

查看许可证

A very simple program to convert a time in seconds to a string giving the time in hours, minutes and seconds. Useful for producing readable toc output from programs which run for ages.

e.g.

help secs2hms
SECS2HMS - converts a time in seconds to a string giving the time in hours, minutes and second
Usage TIMESTRING = SECS2HMS(TIME)]);
Example 1: >> secs2hms(7261)
>> ans = 2 hours, 1 min, 1.0 sec
Example 2: >> tic; pause(61); disp(['program took ' secs2hms(toc)]);
>> program took 1 min, 1.0 secs

引用格式

Simon Robinson (2024). Seconds to hours, minutes, seconds (https://www.mathworks.com/matlabcentral/fileexchange/22817-seconds-to-hours-minutes-seconds), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2007b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Dates and Time 的更多信息
致谢

参考作品: Tools for NIfTI and ANALYZE image

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.4.0.0

Function name shortened. H1 line and help added.

1.0.0.0