Rename code so it can run in MATLAB. Checked code with Ch01 and Ch02 exercies.
Finished checking existing code.