필터 지우기
필터 지우기

How to assemble time series by smaller time series (or windows)

조회 수: 1 (최근 30일)
Adam Taher
Adam Taher 2016년 3월 28일
편집: Ced 2016년 3월 28일
Hi, I have a time series of about 18 minutes containing vector of data and time vector. Both of the 2 vectors are the same length and they correspond to each other. Like x and y in plotting. My goal is to be able to "separate" this time vector in a desired span window. Here is an example:
%F = 120 values of data
%T = 120 values of time vector (in seconds)
% I would like to have windows of 30 seconds each, containing F data.
% So the first window would be the first 30 seconds of T with corresponding F data. The second window
% would be the next 30 seconds of T with corresponding F data and so on.
I think I should use the indices of the timevector to do that.
Any idea? Thank you
Adam

답변 (1개)

Ced
Ced 2016년 3월 28일
편집: Ced 2016년 3월 28일
Could you specificy what you want in the end? A timeseries object? A separate data matrix for each case?
If you want to concatenate data saved in different windows, you can use addsample ( or just concatenate the data before creating the object ). If you have the full time vector, but only want to have a look at a particular time window, you can use getsamples for the timeseries (sub)object, and getdatasamples for an array with the (sub)data.
You can find a list of the available methods at the bottom of

카테고리

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