MATLAB: Covariance matrix from a random vector

covariance-matriximage processingmathematics

Given a random vector, Y=[y1,y2,…,yn]; its covariance matrix look like this:
According to this definition, How can I calculate covariance matrix in matlab? N.B. cov() function makes me confusion….

Best Answer

cov should be the function you use, what about it makes you confusing?