fix some stat functions with integers
author |
Jaroslav Hajek <highegg@gmail.com> |
date |
Wed, 17 Feb 2010 13:31:20 +0100 |
parents |
83fa590b8a09 |
children |
6a50aa2cdf00 |
files |
scripts/ChangeLog scripts/statistics/base/center.m |
diffstat |
2 files changed, 8 insertions(+), 0 deletions(-)
[+]
|
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-17 Jaroslav Hajek <highegg@gmail.com>
+
+ * statistics/base/center.m: Convert integer inputs to doubles.
+
2010-02-17 Jaroslav Hajek <highegg@gmail.com>
* general/interp2: Slightly optimize linear interpolation.
--- a/scripts/statistics/base/center.m
+++ b/scripts/statistics/base/center.m
@@ -41,6 +41,10 @@
endif
n = size (x, dim);
+ if (isinteger (x))
+ x = double (x);
+ endif
+
if (n == 0)
retval = x;
else