Does anyone know to convert clock time into decimal time?
3 次查看(过去 30 天)
显示 更早的评论
Exampler of the data 845 is 8:45 and I want it 875 ( decimal time).
0 个评论
回答(2 个)
Star Strider
2016-9-8
See if this does what you want:
t_d = @(t) (fix(t/100) + rem(t,100)/60)*100; % Anonymous Function
t_hm = 845; % Time To Be ‘Converted’
out = t_d(t_hm) % Desired Result
out =
875
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!