I wrote a MATLAB script to design a supersonic rocket nozzle using the method of characteristics. I also wrote another script to output the pressure and thrust curves of a solid propellant motor given propellant chemistry and grain geometry. The math behind this model can be found here. All this work culminated in a 56-page guide I wrote on the basics of compressible flow and nozzle design which can be found here. The code can be found here.