# HG changeset patch # User schloegl # Date 1331323429 0 # Node ID 304af0bcac9f2b32d7cb6144f5ac2e33fd0c5fa2 # Parent 322014d4cabe47f02a33c005f78027f8d22c80e3 explain relationship to corrcoef in help text diff -r 322014d4cabe -r 304af0bcac9f extra/NaN/inst/cov.m --- a/extra/NaN/inst/cov.m Fri Mar 09 16:13:10 2012 +0000 +++ b/extra/NaN/inst/cov.m Fri Mar 09 20:03:49 2012 +0000 @@ -4,6 +4,14 @@ % NaN's are skipped, NaN do not result in a NaN output. % The output gives NaN only if there are insufficient input data % The mean is removed from the data. +% +% Remark: for data contains missing values, the resulting +% matrix might not be positiv definite, and its elements have magnitudes +% larger than one. This ill-behavior is more likely for small sample +% sizes, but there is no garantee that the result "behaves well" for larger +% sample sizes. If you want the a "well behaved" result (i.e. positive +% definiteness and magnitude of elements not larger than 1), use CORRCOEF. +% However, COV is faster than CORRCOEF and might be good enough in some cases. % % C = COV(X [,Mode]); % calculates the (auto-)correlation matrix of X @@ -26,7 +34,7 @@ % http://mathworld.wolfram.com/Covariance.html % $Id$ -% Copyright (C) 2000-2003,2005,2009 by Alois Schloegl +% Copyright (C) 2000-2003,2005,2009,2011,2012 by Alois Schloegl % This function is part of the NaN-toolbox % http://pub.ist.ac.at/~schloegl/matlab/NaN/