diff scripts/statistics/base/mean.m @ 12435:0f21f258aa17

mean: also accept logical values
author John W. Eaton <jwe@octave.org>
date Thu, 10 Feb 2011 16:24:15 -0500
parents 5ec6aa05638d
children 9337a5c234da
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