This paper presents a solution to the dynamics of a vibrating inhomogeneous string by the method of separation of variables in x and t. The solution consists in transforming the differential equation in x into an integral equation, which is subsequently solved by means of a spectral method. As an extension of a paper in the American Journal of Physics, this material describes and makes available the MATLAB programs required for the spectral calculations.