diff --git a/tests/matlab/EQUALITY.m b/tests/matlab/EQUALITY.m new file mode 100644 index 000000000..4f310175d --- /dev/null +++ b/tests/matlab/EQUALITY.m @@ -0,0 +1,12 @@ +function EQUALITY(name,A,B,tol) +% test equality of two vectors/matrices up to tolerance + +if nargin<4,tol=1e-9;end + +assertion = size(A)==size(B); +if assertion + assertion = all(abs(A-B)