How can I convert the time to hours,minutes and seconds using matlab?
9 views (last 30 days)
Show older comments
tic;
%program code
t=toc;
In what format the time t is displayed. How can I convert and display that time to hours,minutes and seconds?
0 Comments
Accepted Answer
Star Strider
on 5 Sep 2015
One possibility:
t_hms = datevec(t./(60*60*24)) % Express ‘t’ As Fraction Of A Day, Then Use ‘datevec’ To Convert
More Answers (0)
See Also
Categories
Find more on Dates and Time in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!