# HG changeset patch # User Rik # Date 1388781377 28800 # Node ID 48dafd7398408beeb2c9a9b6077ace9c6e82adb3 # Parent 2fbfeacf43f4e85b71b327f1b73d32e5769ed531 cov.m: Document intentional Matlab incompatibility (bug #40751). cov.m: Document intentional Matlab incompatibility (bug #40751). diff -r 2fbfeacf43f4 -r 48dafd739840 scripts/statistics/base/cov.m --- 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