MATLAB: Plot data with time in miliseconds

MATLABplot miliseconds

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?

Best Answer

>> 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. >>