Gamma-ray pulse-height spectra: Formation of a response matrix for iterative unfolding