How to assemble time series by smaller time series (or windows)
2 ビュー (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (1 件)
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
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Time Series についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!