Alex Knok
Alex Knok

Reputation: 19

Plottig data - time plotting

I want to plot some data in Matlab, but I'm having problems with properly displaying time.

Time is in format:

HH:MM:SS.miliseconds 

So for example: 11:16:41.835

I read my .txt file (tab delimited), and now I need to plot data. All data are the same length, and I reckon there is a problem with the time format. Any advice? plot(time, data1) doesn't work either.

Upvotes: 0

Views: 193

Answers (1)

bla
bla

Reputation: 26069

Consider using matlab's built-in datavec, for example:

 dvec = datevec('11:21:02.647', 'HH:MM:SS.FFF') 

dvec =   1.0e+003 *
2.0100    0.0010    0.0010    0.0110    0.0210    0.0026

More info can be found here

Upvotes: 1

Related Questions