From 28415ee2194209a69419a02f030ce8043e2a1616 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Fri, 4 Nov 2011 00:27:43 +0000 Subject: [PATCH] Added EQUALITY for MATLAB tests --- tests/matlab/EQUALITY.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/matlab/EQUALITY.m 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)