If you write a little bit more prettier, you can define a new B matrix as
[latex]
\hat B \hat B^T = \left[\begin{array}{cc}B_1 &B_2\end{array}\right]\left[\begin{array}{cc}\gamma &0\\0 &R^{1}\end{array}\right]\left[\begin{array}{cc}B_1 &B_2\end{array}\right]^T
[/latex]
Now, your [tex]\hat B[/tex] is going to be
[latex]
\hat B = \left[\begin{array}{cc}B_1 &B_2\end{array}\right]\left[\begin{array}{cc}\sqrt{\gamma} &0\\0 &\sqrt{R^{1}}\end{array}\right]
[/latex]
The squareroot of R exist anyway, because you have to choose as such from LQ theory anyway. You can now plug this new B matrix as an argument to your "care" function.
Edit: oops mixed up the minus sign... And another argument bites the dust...
