www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcfoundation/@propertycollection/isequal.m
function OK = isequal(P1,P2) %ISEQUAL True if all the properties of P1 and P2 are equal % % OK = isequal(P1,P2) % Copyright 2006 The MathWorks, Inc. OK = strcmp(class(P1),class(P2)); m1 = P1.Object; m2 = P2.Object; if OK && ~isempty(m1) && ~isempty(m2) pnames = properties(P1); OK = isequal(pnames,properties(P2)); for i=1:length(pnames) p = P1.ObjectProperties.(pnames{i}); OK = OK && p.isequal(m1,m2,P1.Converter); end end