www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@testplansweepsetfilter/check.m

    function tssf = check(tssf)
%TSSF = CHECK(TSSF) checks for inconsistency between data nailed into
%design and available data
%
%  TSSF = CHECK(TSSF)
%  

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

%%%%%%%%%%%
% NEED TO THINK ABOUT HOW THIS FUNCTION SHOULD OPERATE
%%%%%%%%%%%

% do any points nailed into Design no longer exist in the data?
% if so we need to un-nail them
D = get(tssf, 'actualDesign');
designNailed = get(tssf,'designthataredata');
nailedInds = get(tssf,'designthataredatainds');

% strip out only those factors that appear in the design
% we deal with global variables = sweep means
data = get(tssf, 'dataindesign');

% cut out those data already nailed into the Design
inds = ismember(designNailed, data, 'rows');
% find indices into original design
if ~isempty(nailedInds)
    toFreeInDesign = nailedInds(~inds);
    % do this to the actualDesign
    if ~isempty(toFreeInDesign)
        tssf.codeddesign = setdatapoint(D, toFreeInDesign, false);
        queueEvent('tssfActualDesignChanged');
    end
end