diff assert_size.m @ 781:69ab0e69f972 feature/interpolation

Merge with feature/grids
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 24 Jul 2018 20:14:29 -0700
parents afd20f023928
children
line wrap: on
line diff
--- a/assert_size.m	Tue May 22 13:29:47 2018 -0700
+++ b/assert_size.m	Tue Jul 24 20:14:29 2018 -0700
@@ -1,16 +1,5 @@
 % Assert that array A has the size s.
 function assert_size(A,s)
-    errmsg = sprintf('Expected %s to have size %s, got: %s',inputname(1), format_vector(s), format_vector(size(A)));
-    assert(all(size(A) == s),errmsg);
-end
-
-function str = format_vector(a)
-    l = length(a);
-    str = sprintf('[%d',a(1));
-
-    for i = 2:l
-        str = [str sprintf(', %d',a(i))];
-    end
-
-    str = [str ']'];
+    warning('Use assertSize() instead!')
+    assertSize(A,s);
 end
\ No newline at end of file