MATLAB codes for teaching quantum physics: Part 1