MATLAB code for analyzing HSV time series data