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!