MatrixBerryCore
structcompare.m
Go to the documentation of this file.
1 function [isEqual,reportStr]= structcompare(SX,SY,absTol,relTol)
2 
3 import mxberry.core.struct.structcomparevec;
4 if nargin<3
5  absTol=0;
6 end
7 if nargin<4
8  relTol=[];
9 end
10 %
11 if ~isequal(size(SX),size(SY))
12  isEqual=false;
13  reportStr={'sizes are different'};
14  return;
15 end
16 [isEqualVec,reportStr]=structcomparevec(SX(:),SY(:),absTol,relTol);
17 isEqual=all(isEqualVec);
18 
19 
20 
21 
function structcompare(in SX, in SY, in absTol, in relTol)
STRUCTCOMPARE compares two structures using the specified tolerance.
function structcomparevec(in SX, in SY, in absTol, in relTol)
STRUCTCOMPARE compares two structures using the specified tolerance.