www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcfoundation/@propertyinterface/isequal.m
function OK = isequal(p,m1,m2,Converter) %ISEQUAL % % OK = isequal(P1,P2) % Copyright 2006 The MathWorks, Inc. if nargin<4 Converter = []; end if ~isempty(p.SetFunction); v1 = p.getprop(m1,Converter); v2 = p.getprop(m2,Converter); if iscell(v1) && iscell(v2) OK = isequalcell(v1,v2); else OK = isequal(v1,v2); end else % a model is equal if its read-only properties are different OK = true; end function OK = isequalcell(v1,v2) % check all elements of cell are isequal. Note built-in isequal only checks % for numerical equality. OK = all(size(v1)==size(v2)) && all(cellfun(@isequal,v1,v2));