www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtools/@comparisonpane/setDataNames.m

    function setDataNames(obj, Aname, Bname)
%SETDATANAMES Set the names of the data matrices
%
%  SETDATANAMES(OBJ, ANAME, BNAME) sets the names of each matrix being
%  compared.

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


obj.DataNames = {Aname, Bname};

% Update any controllers that exist already
if ~isempty(obj.PlotTypeControllers)
    Remove = false(size(obj.PlotTypeControllers));
    for n = 1:length(obj.PlotTypeControllers)
        if isa(obj.PlotTypeControllers{n}, 'xregGui.rbgroup') ...
                || isgraphics(obj.PlotTypeControllers{n})
            set(obj.PlotTypeControllers{n}, 'String', obj.pGetOptionStrings);
        else
            Remove(n) = true;
        end
    end
    obj.PlotTypeControllers(Remove) = [];
end