changeset 17468:fc4df284efc8

assert.m: Replace repmat call with const*ones(...) for ~23% speed-up * scripts/testfun/assert.m: Replace construction of vector mtol from repmat to tol*ones(...).
author Rik <rik@octave.org>
date Mon, 23 Sep 2013 14:00:58 -0700
parents b8ecdb6ce2f8
children 710b3d5fe966
files scripts/testfun/assert.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/testfun/assert.m	Mon Sep 23 13:43:23 2013 -0700
+++ b/scripts/testfun/assert.m	Mon Sep 23 14:00:58 2013 -0700
@@ -287,7 +287,7 @@
         A_null = complex (A_null_real, A_null_imag);
         B_null = complex (B_null_real, B_null_imag);
         if (isscalar (tol))
-          mtol = repmat (tol, size (A));
+          mtol = tol * ones (size (A));
         else
           mtol = tol;
         endif