www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@conellipsoid/pslGetLocalParameters.m
function ud = pslGetLocalParameters(con) %PSLGETLOCALPARAMETERS Get parameters for Simulink version of local constraint. % % UD = PSLGETLOCALPARAMETERS(CON) % % See also CONELLIPSOID, % CONELLIPSOID/PSLGETPARAMETERS, % CONBASE/PSLGETLOCALPARAMETERS, % CONBASE/SLSETPARAMETERS. % Copyright 2005 The MathWorks, Inc. d = nFactors( con ); wd = 0.5 * d * (d+1); % number of non-zeros terms in W matrix % Indices into the upper and lower part of the W-matrix u = triu( ones( d ) ); u(logical(u)) = 1:wd; u(~u) = (wd+1):(d^2); l = u.'; % Set up parameters ud = struct( ... 'SF', con.scalefactor, ... 'CI', 1:d, ... % center index 'WI', (d+1):(d+wd), ... % W-matrix index 'N', d + wd, ... % number of parameters 'UPPER', u(:), ... 'LOWER', l(:), ... 'v2mD', d, ...% size of the W-matrix 'v2mN', d^2 ,... % numel of the W-matrix 'Z', zeros( 1, wd-d ) ); %------------------------------------------------------------------------------| % EOF %------------------------------------------------------------------------------|