www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@conbase/nActiveFactorsAllowed.m
function [mn, mx] = nActiveFactorsAllowed(con) %NACTIVEFACTORSALLOWED Number of import factors supported by a constraint class % % NF = NACTIVEFACTORSALLOWED(CON) % [MN, MX] = NACTIVEFACTORSALLOWED(CON) % % NF = [MN, MX] is the minimum and maximum number of (active) factors allowed % by the constraint. % % If this method is not overloaded by the sub-class, then it will return % [1, Inf]. If this is not correct for a sub-class, then this method must be % overloaded. % % See also CONBASE, CONBASE/NFACTORS, CONBASE/NACTIVEFACTORS. % Copyright 2004-2005 The MathWorks, Inc. if nargout > 1, mn = 1; mx = Inf; else mn = [1, Inf]; end %------------------------------------------------------------------------------| % EOF %------------------------------------------------------------------------------|