MATLAB code to test different TMOs