I'm trying to model correlated noise by defining a covariance matrix and multiplying the Cholesky decomposition of it by a vector containing uncorrelated noise. How can I ensure the covariance matrix is positive definite?
The covariance matrix I'm defining is banded, symmetric and contains all positive values. When I calculate the eigenvalues, some are very small but negative.
Thanks