MATLAB analysis scripts