Timeseries syncronized by time

조회 수: 1 (최근 30일)
Engineer
Engineer 2014년 1월 15일
댓글: Engineer 2014년 1월 15일
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!

답변 (1개)

dpb
dpb 2014년 1월 15일
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
dpb
dpb 2014년 1월 15일
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 2014년 1월 15일
ok, thanks for your time!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Time Series에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by