Covariance, a 2x2 matrix?

6 次查看(过去 30 天)
Sam
Sam 2015-6-12
评论: Sam 2015-6-13
Hello,
I calculated the covariance between two sets of data (2 columns of data). And I got a 2x2 covariance matrix (see picture). But what is the covariance now? I thought that it would be just 1 number?...
  2 个评论
Azzi Abdelmalek
Azzi Abdelmalek 2015-6-12
You don't need to post a picture, just paste your code
Sam
Sam 2015-6-13
Okay, sorry. But do you know the answer?

请先登录,再进行评论。

回答(1 个)

James Tursa
James Tursa 2015-6-12
编辑:James Tursa 2015-6-12
The nancov function assumes you have two variables because you have two columns of data, so it returns a 2x2 covariance matrix. The diagonal containing the variances of the variables and the off diagonals containing the covariances between the variables.

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by