Adaptive Modulation Matlab Code