www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeoffgui/@mmeditor/hasCorrectAxes.m

    function ok = hasCorrectAxes(obj, pTO)
%HASCORRECTAXES Check whether the multimodel setup has the correct table axes
%
%  HASCORRECTAXES(OBJ, PTO) returns true if the switch variables for the
%  loaded multimodel match with the inputs to an pre-existing tables in the
%  provided tradeoff.

%  Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc.


TO = pTO.info;
if numTables(TO)==0
    ok = true;
else
    [unused, pInp] = getInputs(TO);
    strInp = pveceval(pInp, @getname);
    
    ok =  length(strInp)==length(obj.SwitchInputs) ...
            && all(strcmp(strInp, obj.SwitchInputs(obj.AxisOrder)));
end