www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptimtablefiller/setFillFactors.m

    function obj = setFillFactors(obj, fillfacs, varargin)
%SETFILLFACTORS Set factors that will fill the tables
%
%   OBJ = SETFILLFACTORS(OBJ, FILLFACS) sets the fill factors for all
%   tables in OBJ.
%
%   OBJ = SETFILLFACTORS(OBJ, FILLFACS, pTABS) sets the fill factors for
%   specified tables. pTABS must be a row vector of table pointers that are
%   a subset of those table pointers in OBJ. FILLFACS must be a
%   1-by-len(pTABS) pointer array of fill factors.
%  
%   See also CGOPTIMTABLEFILLER/GETFILLFACTORS

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


% Find index of the specified tables in the table filler
inds = pGetTablesIdx(obj, varargin{:});

% Ensure that the user has supplied sensible information for the table
% filling object
tables = obj.tables(inds);
[ok, errmsg] = pCheckTableLinks(tables, fillfacs);
if ~ok
    error('mbc:cgoptimtablefiller:InvalidArgument', errmsg);
end

% If ok, set the information for the tables
obj.fillfactors(inds) = fillfacs;