# HG changeset patch # User Rik # Date 1379970058 25200 # Node ID fc4df284efc8c789ffbfa4f49b3eb01433a9f0b3 # Parent b8ecdb6ce2f8e520813f00f06ea1ed264bdd75aa 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(...). diff --git a/scripts/testfun/assert.m b/scripts/testfun/assert.m --- a/scripts/testfun/assert.m +++ b/scripts/testfun/assert.m @@ -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