How can I convert a number to time?
36 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jack Rogers
el 13 de Feb. de 2020
I have a column of data going from 1 to 58,232 that represents time, where 10 units is equal to 1 second. I want to be able to convert this column into minutes:seconds:milliseconds but am not sure how to achieve this?
Thanks, Jack.
0 comentarios
Respuesta aceptada
Stephen23
el 13 de Feb. de 2020
Editada: Stephen23
el 13 de Feb. de 2020
>> V = randi(58232,7,1) % fake data
V =
7565
33124
27334
694
19632
9445
46253
>> D = duration(0,0,V/10, 'Format','hh:mm:ss.SSS')
D =
00:12:36.500
00:55:12.400
00:45:33.400
00:01:09.400
00:32:43.200
00:15:44.500
01:17:05.300
"I want to be able to convert this column into minutes:seconds:milliseconds..."
You will need hours as well, because your maximum value is well over one hour.
0 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!