You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Useful for autoregression on a univariate time series.
Returns the indexes for the predictor and response variables according to a sliding window.
Parameters:
numRecords - the number of records in the dataset
windowLag - number of past samples to take - it will be equal to
the size of the predictor vector X. Default 10
predHorizon - the prediction horizon is the number of steps into
the future that predictions are to be made. Default 1
windowPattern - by default the window will take all consecutive
values in the past over the window lag size, however it is
possible to sample using a custom pattern.
For example taking every second value can be done by setting
this parameter to 1:2:5. Default 1:windowLag
stepSize - number of steps taken when window is moved. Default 1
Returns:
indX - predictor variable indexes
indY - response variable indexes
Cite As
Florin Schimbinschi (2026). get_Sliding_Indexes(numRecords, windowLag, predHorizon, windowPattern, stepSize) (https://au.mathworks.com/matlabcentral/fileexchange/58730-get_sliding_indexes-numrecords-windowlag-predhorizon-windowpattern-stepsize), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.1.0 (3.31 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
