From bcc6e5e74364f42e31a9fbd8e6ef81fc79235ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Telemachus=29?= <stephane.adjemian@univ-lemans.fr> Date: Sun, 9 Nov 2014 17:22:23 +0100 Subject: [PATCH] Fixed bug. First input of isa() routine is the tested object, not the type of the object... --- src/dassert.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dassert.m b/src/dassert.m index 354ca75..021e9e4 100644 --- a/src/dassert.m +++ b/src/dassert.m @@ -48,7 +48,7 @@ if ~isequal(cA,cB) error('dassert:: Compared objects are not of the same type!') end -if isa(cA,'double') +if isa(A,'double') if use_isequal_matlab_builtin t = isequal(A,B); if ~t @@ -59,7 +59,7 @@ if isa(cA,'double') t = 0; end end -elseif isa(cA,'cell') +elseif isa(A,'cell') rA = reshape(cA, prod(sA), 1); rB = reshape(cB, prod(sB), 1); for i=1:nn @@ -72,7 +72,7 @@ elseif isa(cA,'cell') break end end -elseif isa(cA,'struct') +elseif isa(A,'struct') A = struct2cell(A); B = struct2cell(B); if nargin>2 -- GitLab