From 8cf867bdbd82bce00f7dab8493b728d7e9af8e64 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Sat, 16 Jun 2012 03:59:12 +0000 Subject: [PATCH] Better EQUALITY --- matlab/EQUALITY.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/matlab/EQUALITY.m b/matlab/EQUALITY.m index 4f310175d..114867ac0 100644 --- a/matlab/EQUALITY.m +++ b/matlab/EQUALITY.m @@ -1,12 +1,14 @@ -function EQUALITY(name,A,B,tol) +function EQUALITY(name,expected,actual,tol) % test equality of two vectors/matrices up to tolerance if nargin<4,tol=1e-9;end -assertion = size(A)==size(B); +assertion = size(expected)==size(actual); if assertion - assertion = all(abs(A-B)