tomwalters@0: % tool tomwalters@0: % tomwalters@0: % INPUT VALUES: tomwalters@0: % tomwalters@0: % RETURN VALUE: tomwalters@0: % tomwalters@0: % bleeck@3: % This external file is included as part of the 'aim-mat' distribution package bleeck@3: % (c) 2011, University of Southampton bleeck@3: % Maintained by Stefan Bleeck (bleeck@gmail.com) bleeck@3: % download of current version is on the soundsoftware site: bleeck@3: % http://code.soundsoftware.ac.uk/projects/aimmat bleeck@3: % documentation and everything is on http://www.acousticscale.org bleeck@3: tomwalters@0: tomwalters@0: function ret=structisequal(str1,str2) tomwalters@0: tomwalters@0: s1=struct2stringarray(str1,'test'); tomwalters@0: s2=struct2stringarray(str2,'test'); tomwalters@0: tomwalters@0: strings1=sort(s1); tomwalters@0: strings2=sort(s2); tomwalters@0: tomwalters@0: nr1=length(strings1); tomwalters@0: nr2=length(strings2); tomwalters@0: if nr1~=nr2 tomwalters@0: ret=0; tomwalters@0: return tomwalters@0: end tomwalters@0: tomwalters@0: for i=1:nr1 tomwalters@0: s1=strings1(i);s1=s1{1}; tomwalters@0: s2=strings2(i);s2=s2{1}; tomwalters@0: if length(s1)~=length(s2) tomwalters@0: ret=0; tomwalters@0: return tomwalters@0: end tomwalters@0: if ~isempty(find(s1~=s2)) tomwalters@0: ret=0; tomwalters@0: return tomwalters@0: end tomwalters@0: end tomwalters@0: ret=1;