www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtools/@normcomp/pInitInputs.m
function pInitInputs(obj, pM, pT) %PINITINPUTS Private method that sets up the inputs lists correctly. % % PINITINPUTS(OBJ, PM, PT) % Copyright 2000-2005 The MathWorks, Inc. and Ford Global Technologies, Inc. obj.Model = pM; obj.Table = pT; if isempty(pM) || isnull(pM) || isempty(pT) || isnull(pT) % Empty the display obj.CurrentVars = null(xregpointer, 0); obj.CurrentGridVars = null(xregpointer, 0); obj.ValueTable.setVariables({}, [], {}); else % Gridding variables are only the *independent* table inputs TblInputs = pT.getinports; obj.CurrentGridVars = cgindependentvars(TblInputs); AllInputs = unique(pM.getinports); if length(obj.CurrentGridVars)>0 && length(obj.CurrentGridVars)<3 obj.CurrentVars = cginitinputs(obj.ValueTable, obj.CurrentGridVars, AllInputs); else obj.ValueTable.setVariables({}, [], {}); obj.CurrentVars = null(xregpointer, 0); end end