Matlab/Octave Code for MTT