matlab code from melb uni