Renormalization group flow in one- and two-matrix models