www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@conrange/pslGetParameters.m
function ud = pslGetParameters(con) %PSLGETPARAMETERS Get parameters required for Simulink version of constraint. % % UD = PSLGETPARAMETERS(CON) % % See also CONRANGE, % CONBASE/SLSETPARAMETERS, % CONBASE/PSLGETPARAMETERS. % Copyright 2005 The MathWorks, Inc. % Scale factor cif = getActiveFactors( con ); sc = 2 ./ (getMax( cif ) - getMin( cif )); % Set up parameters ud = struct( ... 'M', con.Center, ... 'HW', con.HalfWidth, ... 'LB', con.Center - con.HalfWidth, ... 'UB', con.Center + con.HalfWidth, ... 'Scale', sc ); %------------------------------------------------------------------------------| % EOF %------------------------------------------------------------------------------|