On the Stability of a Class of Matrices with Time-Varying Parameters