changeset 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 2fbfeacf43f4
children 1c1236fd179a
files scripts/statistics/base/cov.m
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/statistics/base/cov.m	Fri Jan 03 16:28:27 2014 +0100
+++ b/scripts/statistics/base/cov.m	Fri Jan 03 12:36:17 2014 -0800
@@ -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