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

    function con = setInputFactors(con, cif)
%SETINPUTFACTORS Set the input factors for a constraint
%
%  CON = SETINPUTFACTORS(CON, CIF)
%
%  This method is used to change the properties, i.e., names, symbols or
%  ranges, of the input factors. To change the number or the order of
%  inputs, use SETMATCHEDFACTORS
%

%  Copyright 2006-2009 The MathWorks, Inc.

con.conbase = setInputFactors(con.conbase, cif);

if isempty(con.ActiveFactors)
    % update local input constraint
    cil = getInputFactors(con.ConList{1});
    cifLocal = cif(1:length(cil));
    
    for i=1:length(con.ConList)
        con.ConList{i} = setInputFactors(con.ConList{i}, cifLocal);
    end
end


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