MATLAB Code for AE 211