Azzera filtri
Azzera filtri

Timeseries syncronized by time

3 visualizzazioni (ultimi 30 giorni)
Engineer
Engineer il 15 Gen 2014
Commentato: Engineer il 15 Gen 2014
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!

Risposte (1)

dpb
dpb il 15 Gen 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 Commenti
dpb
dpb il 15 Gen 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.
Engineer
Engineer il 15 Gen 2014
ok, thanks for your time!

Accedi per commentare.

Categorie

Scopri di più su Time Series in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by