www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@coninputfactor/setNames.m

    function cif = setNames(cif, names)
%SETNAMES Set the names of a constraint input factor object
%
%  CIF = SETNAMES(CIF, NAMES)
%
%  NAMES must be cell-string with the same number of elements as CIF.
%
%  See also CONBASE, CONINPUTFACTOR, CONINPUTFACTOR/GETNAMES.

%  Copyright 2004-2005 The MathWorks, Inc.

% Ensure that we have a row
names = names(:)';

% Check the size
if iscellstr( names ) && length( names ) == length( cif ),
    cif.Name = names;
else
    error(message('mbc:coninputfactor:InvalidArguments14'));
end

%------------------------------------------------------------------------------|
% EOF
%------------------------------------------------------------------------------|