Matlab code for QUT MAB422 Assignement 2