Update Sub Set of the State Vector in Kalman Filter I question about Kalman Filter:

If I have system state 
$$
\mathbf{X} = [x_1\ x_2\ x_3\ x_4\ x_5]^T,
$$ 
these state elements are independent. I have measurement from a sensor to correct the predicted state. Normally, the correction will perform on all elements of state $\mathbf{X}$ and produce new covariance matrix $\mathbf{P}$.

If I just want to correct the substate only $x_1$ and $x_2$, and do not do anything with $x_3$, $x_4$ and $x_5$, how can I do that ? and how to compute $\mathbf{P}$?
It will depend upon the measurement model. If your sensor provides data for all the states i.e. for $x_1,x_2,x_3,x_4,x_5$, then you can update only $x_1$ and $x_2$ by making the noise covariance corresponding to $x_3,x_4,x_5$ very large. Actually, there will still be some corrections in these three states but they will be small. The higher the covariance corresponding to these three states, the lower is the correction in them.
Alternatively, you can make the last three rows and last three columns of process covariance very small.