diff scripts/statistics/base/mean.m @ 7411:83a8781b529d

[project @ 2008-01-22 21:52:25 by jwe]
author jwe
date Tue, 22 Jan 2008 21:52:26 +0000
parents a1dbe9d80eee
children 81d6ab3ac93c
line wrap: on
line diff
--- a/scripts/statistics/base/mean.m	Tue Jan 22 21:34:24 2008 +0000
+++ b/scripts/statistics/base/mean.m	Tue Jan 22 21:52:26 2008 +0000
@@ -116,3 +116,14 @@
   endif
 
 endfunction
+
+%!test
+%! x = -10:10;
+%! y = x';
+%! z = [y, y+10];
+%! assert(mean (x) == 0 && mean (y) == 0 && mean (z) == [0, 10]);
+
+%!error mean ();
+
+%!error mean (1, 2, 3);
+