www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@contable1/pslGetParameters.m
function ud = pslGetParameters(c) %PSLGETPARAMETERS Get parameters required for Simulink version of constraint. % % UD = PSLGETPARAMETERS(CON) % % See also CONTABLE1, % CONBASE/SLSETPARAMETERS, % CONBASE/PSLGETPARAMETERS. % Copyright 2005 The MathWorks, Inc. factors = getActiveIndices( c ); % convert inequality to 1/-1 in Gain if c.le, Ineqval = -1; else Ineqval = 1; end % Scale factor cif = getActiveFactors( c ); sc = 2 ./ (getMax( cif(2) ) - getMin( cif(2) )); % Set up parameters ud = struct( ... 'NVar', nFactors( c ), ... 'TabBrk', c.breakcols, ... 'TabVal', c.table, ... 'Ineqval', Ineqval, ... 'Scale', sc ); %------------------------------------------------------------------------------| % EOF %------------------------------------------------------------------------------|