This document provides Matlab code examples for modeling various receiver non-idealities including additive white Gaussian noise, carrier frequency offset, phase noise, I/Q imbalances, automatic gain control, sampling clock offset, and clipping and quantization. The code shows how to apply these non-idealities to an input signal in sequence to generate a simulated received signal. Parameters for each non-ideality can be configured and the code outputs both the processed signal and information about the non-ideality parameters.