Timeseries syncronized by time
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Is it possible to match 2 or more timeseries that have different time vector, syncronized by time?
For example,let's say, ts1 goes form 07:00:00 to 09:00:00 o'clock, ts2 goes from 08:00:00 to 09:00:00, ts3 from 08:30:00 to 10:00:00. each data should be visible just in the right time they were taken:in this way I could analyze data for a single interval of time from different instrumentations...
or maybe it is better to create a single timeseries with 3 different dataset?
thanks!
0 comentarios
Respuestas (1)
dpb
el 15 de En. de 2014
Convert all to datenums with datenum and then you can
a) plot on a common axis and automagically they'll line up correctly (use datetick to label the axes in time), and
b) use logical comparisons to select subsets of a common start/end time within the overall time vectors.
"Piece o' cake"... :)
3 comentarios
dpb
el 15 de En. de 2014
Quite possibly (probably, even, maybe?) yes.
I've not played with the timeseries object enough to be very familiar with it, but what little I have it seems the only way to do what you're asking is to essentially build the time vector into it manually as it just uses ordinal number by default (or a fixed origin, fixed dt). Perhaps you could figure out a way to do that by picking the first origin and the last and blank filling to make them all commensurate in length but that seems excessive storage for nothing to me.
I'm not certain what your request above means of "having a single time seres with all data in it". If the times are duplicated or the data is from different instruments, do you really want to commingle it into one long vector? Not knowing what you then intend to do with it, I don't know how to better answer, specifically.
Ver también
Categorías
Más información sobre Time Series en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!