help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cov.m function behaves different from Matlab


From: david
Subject: cov.m function behaves different from Matlab
Date: Thu, 26 Mar 2009 06:30:24 -0700 (PDT)

Hi,

I have a question about covariance function cov.m in Octave. I find it can give 
different result than Matlab.

For example:

octave:70> x
x =

   548   656   297
   485   812   963
   145   528   664

octave:71> y
y =

   53   69   54
   12   32   47
   65   36   88

octave:72> cov(x,y)
ans =

  -3378.83   2378.33  -4533.50
  -3830.67   -447.33  -2848.00
  -6458.17  -6324.83   -740.50


However, in matlab:
>> cov(x,y)

ans =

   1.0e+04 *

    6.1720   -0.0503
   -0.0503    0.0503

Why in the output the matrix size is different and result is also different? I 
am using Octave 3.0.2


Thank you very much!

David



      



reply via email to

[Prev in Thread] Current Thread [Next in Thread]