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

    function cif = setRange(cif, range)
%SETRANGE Set the expected range for constraint input factors
%
%  CIF = SETRANGE(CIF, RANGE)
%
%  RANGE with be a 2 by length( CIF ) array. The first row is the minimun
%  values and the second row are the maximums.
%
%  See also CONBASE, CONINPUTFACTOR.

%  Copyright 2004-2005 The MathWorks, Inc.

% Check the size
if isnumeric( range ) && all( size( range ) == [2, length( cif )] ),
    cif.Min = range(1,:);
    cif.Max = range(2,:);
else
    error(message('mbc:coninputfactor:InvalidArguments15'));
end

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