www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptimtablefiller/private/pCheckTableLinks.m
function [ok, msg] = pCheckTableLinks(tables, fillfactors) %PCHECKTABLELINKS Private method to check table links % % Copyright 2000-2009 The MathWorks, Inc. and Ford Global Technologies, Inc. ok= false; msg = ''; if ~isequal(size(fillfactors), size(tables)) msg = 'PFILL must be a pointer vector of identical dimension to PTABS'; else ok = true; end if ok fok = isvalid(fillfactors); ismodel = pveceval(fillfactors(fok), @isa, 'cgmodexpr'); ismodel = [ismodel{:}]; isvariable = pveceval(fillfactors(fok), @isa, 'cgvariable'); isvariable = [isvariable{:}]; if ~all(ismodel | isvariable) ok = false; msg = 'Each member of PFILL must point to a model or a variable'; end end