www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@contable2/pslGetParameters.m
function ud = pslGetParameters(c) %PSLGETPARAMETERS Get parameters required for Simulink version of constraint. % % UD = PSLGETPARAMETERS(CON) % % See also CONTABLE2, % CONBASE/SLSETPARAMETERS, % CONBASE/PSLGETPARAMETERS. % Copyright 2005 The MathWorks, Inc. % 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(3) ) - getMin( cif(3) )); % Set up parameters ud = struct( ... 'NVar', nFactors( c ), ... 'TabBrkY', c.breakcols, ... 'TabBrkX', c.breakrows, ... 'TabVal', c.table.', ... 'Ineqval', Ineqval, ... 'Scale', sc ); %------------------------------------------------------------------------------| % EOF %------------------------------------------------------------------------------|