www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xreglinear/modelcmp.m
function c = modelcmp(m1,m2) %MODELCMP True if two models are the same. % % True if % - same class % - same number of factors % - same number of parameters size(model,1) % - same order % - all terms have the same status % Copyright 2000-2005 The MathWorks, Inc. and Ford Global Technologies, Inc. c = strcmp(class(m1),class(m2)) && ... nfactors(m1)==nfactors(m2) &&... size(m1,1)==size(m2,1); if c o1= get(m1,'order'); o2= get(m2,'order'); c= c && all(o1==o2) && all(getstatus(m1)==getstatus(m2)); end