Problem with data type: calculate [HH:mm:ss.FFF]

1 回表示 (過去 30 日間)
René Dienemann
René Dienemann 2020 年 3 月 25 日
回答済み: Steven Lord 2020 年 3 月 25 日
Hey, I need an easy way, to convert this time from [HH:mm:ss.FFF] into seconds. I have tried different ways, but I always have problems with the type of the data.
If I convert the data from str2double, I get "NaN" or can I seperate "HH, mm, ss, FFF" to calculate the seconds?
Thanks and best regards René

回答 (1 件)

Steven Lord
Steven Lord 2020 年 3 月 25 日
Convert the text representations of those values into a duration array then call seconds on the duration array.

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by