MATLAB code and associated files for tutorial