Plot data with time in miliseconds
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi all, I have the following problem: I read from a text file the time and the corresponding value of an output signal. The time stamp has the following format: 2017-06-12 13:46:31.486. The file has thousands of measurement samples. How can I plot a certain part of the signal and see on the x-axis the time stamps in miliseconds resolution?
0 comentarios
Respuesta aceptada
dpb
el 26 de Jun. de 2017
Editada: dpb
el 28 de Jun. de 2017
>> fmt='yyyy-MM-dd HH:mm:ss.SSS''
>> dtn=datetime('2017-06-12 13:46:31.486','Inputformat',fmt)
dtn =
12-Jun-2017 13:46:31
>> dtn.Format=fmt
dtn =
2017-06-12 13:46:31.486
Plot against dtn and zoom in to heart's content to see detail. >>
5 comentarios
dpb
el 28 de Jun. de 2017
Editada: dpb
el 28 de Jun. de 2017
My bad, Steven, apologies. :)
The "they" above in context implies TMW granted, but not who I was thinking of; I was already aware the reference from whence the abbreviations come is of external origin so was meaning in that document. No way could have known that, so mea culpa, a thousand wet-noodle lashings! :)
I still don't see why THAT "THEY" couldn't have had more consistency, what's so special about 'MM' it simply had to be capitalized in the date portion while years and days are lowercase and vice versa with hours,minutes,seconds? Makes no sense to me at all. And, similarly, why not reserve the opposite case of the rest for the fractional part of the seconds? "Normalize, normalize!"
The error missives will help, it would be better if it could show up in the auto-type feature somehow, though, to prevent the mistake before instead of after. Probably too much parsing to be practical, but "just sayin'" :)
Wherever the fundamental blame lies for the particular encoding (and clearly this isn't TMW, yes :) ) it makes for a very user-belligerent interface owing to trying to keep it all straight. I suppose if this was one of the most frequent usages one made eventually it would become ingrained but for the occasional/newer user it's just a nuisance and highly error-prone.
dpb
el 28 de Jun. de 2017
PS. Worth pointing out for the record again where it did come from though, and that it really isn't you'se guys' fault this time! :)
Más respuestas (0)
Ver también
Categorías
Más información sobre Dates and Time en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!