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

    function obj = setFillAction(obj, fillAction)
%SETFILLACTION Set whether the data set will be overwritten
%
%   OBJ = SETFILLACTION(OBJ, FILLACTION) sets the code that indicates the
%   action performed when FILL is called. The valid values of FILLACTION
%   and their meanings are outlined below:
%
%   FILLACTION = 1: Export data to a new data set
%   FILLACTION = 2: Append data to an existing data set
%   FILLACTION = 3: Overwrite an existing data set with data
%
%   See also CGOPTIMDATASETFILLER/GETFILLACTION

%   Copyright 2006 The MathWorks, Inc.

[ok, msg] = pCheckFillAction(fillAction);
if ok
    obj.FillAction = fillAction;
else
    error('mbc:cgoptimdatasetfiller:InvalidArgument', msg);
end