Why does my GAIN remain constant after a few cycles? I am assuming that GAIN is the matrix P?

From this example:

function [x,P]=ukf(fstate,x,P,hmeas,z,Q,R)
% UKF   Unscented Kalman Filter for nonlinear dynamic systems
% [x, P] = ukf(f,x,P,h,z,Q,R) returns state estimate, x and state covariance, P 
% for nonlinear dynamic system (for simplicity, noises are assumed as additive):
%           x_k+1 = f(x_k) + w_k
%           z_k   = h(x_k) + v_k
% where w ~ N(0,Q) meaning w is gaussian noise with covariance Q
%       v ~ N(0,R) meaning v is gaussian noise with covariance R
% Inputs:   f: function handle for f(x)
%           x: "a priori" state estimate
%           P: "a priori" estimated state covariance
%           h: fanction handle for h(x)
%           z: current measurement
%           Q: process noise covariance 
%           R: measurement noise covariance
% Output:   x: "a posteriori" state estimate
%           P: "a posteriori" state covariance


I plot P[0,0] is that correct?
$P$ is the state covariance matrix, not the Kalman gain, though the Kalman gain $K$ is usually calculated using it. 

It is normal in simple Kalman filters (ones that do not vary with time) for the state covariance matrix to stabilize after a while so that it is constant.

See, for example, the plots in Figure 3(b) and 3(c) in this PDF which show how both the Kalman gain $K$ and the state covariance $P$ go to a constant value after a relatively short space of time.

Because this happens, the Kalman filter evolution is often ignored in practice and the steady state version is what is implemented.