Alternating Minimization Algorithm for Multiuser RIS-assisted MIMO Systems