opttspart will optimally partition multivariate time series data into successive partitions according to a fitness function . This function for example can be used to detect changes in time series by separating the parts before and after a change that maximize a additive function of the time series. For example, a square wave that has positive and negative parts, can be partitioned by a fitness function that chooses the maximum value between the sum of elements or negative sum of elements; if the partition has only negative elements then a negative sum is more and if it has a mix of negative and positive elements then it is better to move the partition it until you get a larger maximum value. Using cells to first section the time series speeds up the function .
 Jackson, B., Scargle, J. D., Barnes, D., Arabhi, S., Alt, A., Gioumousis, P., ... & Tsai, T. T. (2005). An algorithm for optimal partitioning of data on an interval. IEEE Signal Processing Letters, 12(2), 105-108
 Butail, S. and Porfiri, M. Detecting switching leadership in collective motion, Chaos, 29, 011102, 2019.
Sachit Butail (2021). opttspart (https://www.mathworks.com/matlabcentral/fileexchange/70010-opttspart), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!