Problem while using covariance function cov()

2 次查看(过去 30 天)
hello, I am new to matlab and image processing so I have a quite basic query. I read somewhere that covariance matrix can be calculate as d*d' (where d is a matrix of size 1x81920). but matlab also has an inbuilt func. cov() to find covariance matrix. So my question is how to decide which one to use? (As both of them are giving different answers)and what is the main difference between two of them?
  2 个评论
Jon
Jon 2015-7-26
Which you use depends on which definition of covariance you wish to employ. Matalb's documentation for the cov() function clearly writes how it computes covariance. The signals' means are removed and there is a bias correction factor (1/N-1).
Covariance is a single quantity, not a matrix. You can compute the covariance matrix, which is contains the variances along the diagonal and the covariances where i~=j.
Where did you read about d*d' being covariance? There is no covariance if there is only one signal (just variance).

请先登录,再进行评论。

回答(0 个)

标签

尚未输入任何标签。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by