Covariance matrix $P$ for an Extended Kalman Filter not symmetric I am trying to implement an Extended Kalman Filter (EKF) and it is becoming harder than I thought.
I have one question. I noticed that the covariance matrix which should get updated over each iteration is not symmetric. I am debugging through MATLAB. 
I know that P should be symmetric and stay symmetric.
What does it mean if the covariance matrix is not symmetric? Where it could be the error? 
EDIT: Any covariance matrix MUST be symmetric no matter what. The symmetry comes from its definition. The covariance tells you how two variables are related and therefore if $x$ is related to $y$ also $y$ will be related to $x$ and of course in the same way.
My problem was that I was checking with the MATLAB function issymmetric(A) if the matrix $A$ was symmetric. 
Apparently that function checks for exact symmetry and therefore if the involved matrixes are computed numerically and therefore it is not exactly symmetric it will give you false/0 as a result. But, if for the same matrix I checked A-A' I had something of the order of 1e-15.
Thanks in advance.

A quick ad-hoc fix that (in my experience) works great is to simply "symmetrize" the $P$ matrix every time you calculate a new potentially asymmetric value for it by doing:
$P'=\dfrac{P+P^T}{2}$
