An application of generalized matrix inversion