MATLAB Answers

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

5 views (last 30 days)
René Dienemann
René Dienemann on 25 Mar 2020
Answered: Steven Lord on 25 Mar 2020
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é

  0 Comments

Sign in to comment.

Answers (1)

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

  0 Comments

Sign in to comment.

Sign in to answer this question.


Translated by