diff scripts/statistics/base/center.m @ 20652:a3b9ee5c040a

Replace bsxfun with broadcasting for performance with complex inputs (bug #38628). cumtrapz.m, quadgk.m, trapz.m, center.m, zscore.m: Replace bsxfun with broadcasting for performance where inputs might be complex.
author Rik <rik@octave.org>
date Mon, 12 Oct 2015 21:28:32 -0700
parents d9341b422488
children
line wrap: on
line diff
--- a/scripts/statistics/base/center.m	Mon Oct 12 21:13:47 2015 -0700
+++ b/scripts/statistics/base/center.m	Mon Oct 12 21:28:32 2015 -0700
@@ -70,7 +70,7 @@
   if (n == 0)
     retval = x;
   else
-    retval = bsxfun (@minus, x, mean (x, dim));
+    retval = x - mean (x, dim);
   endif
 
 endfunction