Mercurial > hg > octave-nkf
diff scripts/statistics/base/cov.m @ 18206:48dafd739840 stable
cov.m: Document intentional Matlab incompatibility (bug #40751).
cov.m: Document intentional Matlab incompatibility (bug #40751).
author | Rik <rik@octave.org> |
---|---|
date | Fri, 03 Jan 2014 12:36:17 -0800 |
parents | d63878346099 |
children | 4197fc428c7d |
line wrap: on
line diff
--- a/scripts/statistics/base/cov.m +++ b/scripts/statistics/base/cov.m @@ -55,6 +55,13 @@ ## @item 1: ## normalize with @math{N}, this provides the second moment around the mean ## @end table +## +## @sc{matlab} compatibility: Octave always computes the covariance matrix. +## For two inputs, however, @sc{matlab} will calculate +## @code{cov (@var{x}(:), @var{y}(:))} whenever the number of elements in +## @var{x} and @var{y} are equal. This will result in a scalar rather than +## a matrix output. Code relying on this odd definition will need to be +## changed when running in Octave. ## @seealso{corr} ## @end deftypefn