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!