I am little bit confused about the realization of the Kalman Filter in Matlab/Simulink
The Kalman gain is defined as K=PC'(CPC'+R), where P is error covariance matrix and R is a covariance matrix of measurenmnet noise. But in matlab there is a function [X,L,G]=dare (A,B,Q,R) for solving the Riccati equation. But the solution of the equation delivers completely different solution for the gain as if you compute it with the formel for K.
The simulink block of the kalman filter also delivers another result as just a calculation of kalman filter algorithm for steady state case.
x*=Ax^+Bu
x=x*+L(y-Cx*)
You are missing the inverse in the Kalman gain. The Kalman gain is
$$ K = PC^T( CPC^T + R)^{-1}$$
Also, the covariance matrix converges to a steady state value, and I believe the solver in Matlab returns the steady state value.