changeset 12435:0f21f258aa17

mean: also accept logical values
author John W. Eaton <jwe@octave.org>
date Thu, 10 Feb 2011 16:24:15 -0500
parents 02669a1aa070
children a754c2d8a13f
files scripts/statistics/base/mean.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/statistics/base/mean.m	Thu Feb 10 00:58:31 2011 -0500
+++ b/scripts/statistics/base/mean.m	Thu Feb 10 16:24:15 2011 -0500
@@ -65,7 +65,7 @@
     print_usage ();
   endif
 
-  if (!isnumeric (x))
+  if (! (isnumeric (x) || islogical (x)))
     error ("mean: X must be a numeric vector or matrix");
   endif