[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cov(x,y) = matrix or number?
From: |
Ismael Núñez-Riboni |
Subject: |
Re: cov(x,y) = matrix or number? |
Date: |
Mon, 12 Mar 2012 14:43:28 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 |
On 03/12/2012 01:40 PM, Jordi Gutiérrez Hermoso wrote:
On 12 March 2012 02:25, Muhali<address@hidden> wrote:
octave-3.6.1:8> X = [1 2; 1 3; 2 5] ;
octave-3.6.1:9> cov(X)
ans =
0.33333 0.83333
0.83333 2.33333
I know that. The question was about Matlab compatibility.
Yes, it should do whatver Matlab does. Please submit a patch.
I also realized before the absence of the auto-covariance values with
Octave's cov function.
My patched function is attached and it yields:
octave:190> cov2(X)
ans =
0.33333 0.83333
0.83333 2.33333
octave:191> cov2(X(:,1), X(:,2))
ans =
0.33333 0.83333
0.83333 2.33333
I did a very simple patch, probably this can be done better, but I hope
it helps...
Cheers, Ismael.
cov2.m
Description: Text Data
- cov(x,y) = matrix or number?, Muhali, 2012/03/11
- Re: cov(x,y) = matrix or number?, Jordi Gutiérrez Hermoso, 2012/03/11
- Re: cov(x,y) = matrix or number?, Thomas D. Dean, 2012/03/11
- Re: cov(x,y) = matrix or number?, Muhali, 2012/03/12
- Re: cov(x,y) = matrix or number?, Jordi Gutiérrez Hermoso, 2012/03/12
- Re: cov(x,y) = matrix or number?,
Ismael Núñez-Riboni <=
- Re: cov(x,y) = matrix or number?, Jordi Gutiérrez Hermoso, 2012/03/12
- Re: cov(x,y) = matrix or number?, Jordi Gutiérrez Hermoso, 2012/03/12
- Re: cov(x,y) = matrix or number?, Ismael Núñez-Riboni, 2012/03/12