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

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é

Respuestas (1)

Steven Lord
Steven Lord el 25 de Mzo. de 2020

0 votos

Convert the text representations of those values into a duration array then call seconds on the duration array.

Categorías

Más información sobre Data Type Conversion en Centro de ayuda y File Exchange.

Productos

Versión

R2019b

Preguntada:

el 25 de Mzo. de 2020

Respondida:

el 25 de Mzo. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by