Let $A$, $B_1$, $B_2$ and $C_1$ be known matrices of appropriate size, $M$ is a positive definite solution of following equation. How can I solve the following discrete Riccati equation with Matlab?
$$M = A^T M \left(I + \left(B_2 B_2^T - \gamma^{-2} B_1 B_1^T \right) M \right)^{-1}A + C_1^T C_1$$
Thanks in advance!
PS: I refer to this lecture.