Added appendix with MATLAB code to document. Small change to MATLAB code - didn't seem to affect the produced graphs.