Filter löschen
Filter löschen

Covariance, a 2x2 matrix?

8 Ansichten (letzte 30 Tage)
Sam
Sam am 12 Jun. 2015
Kommentiert: Sam am 13 Jun. 2015
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 Kommentare
Azzi Abdelmalek
Azzi Abdelmalek am 12 Jun. 2015
You don't need to post a picture, just paste your code
Sam
Sam am 13 Jun. 2015
Okay, sorry. But do you know the answer?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

James Tursa
James Tursa am 12 Jun. 2015
Bearbeitet: James Tursa am 12 Jun. 2015
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.

Kategorien

Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by