changeset 12436:36ebbc3e82aa release-3-4-x

mean: also accept logical values
author John W. Eaton <jwe@octave.org>
date Thu, 10 Feb 2011 16:24:15 -0500
parents 357d593d87c1
children b03fe57893ae
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
+++ b/scripts/statistics/base/mean.m
@@ -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