This document contains code for analyzing and verifying the sampling theorem. It contains three parts: 1) Undersampling and oversampling a cosine signal, 2) Commenting on reconstructing a signal from its samples, and 3) Verifying the Nyquist criterion by reconstructing a multi-frequency signal using different sampling rates and observing the reconstruction quality.