Added MATLAB data analysis functions