www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@conellipsoid/setActiveIndices.m
function con = setActiveIndices(con, ai) %SETACTIVEINDICES Set the indices of the active factors for an Ellipsoid Constraint % % CON = SETACTIVEINDICES(CON, AI) % % This method will completely reset all the parameter information stored % in the Ellipsoid Constraint, i.e., the ellipsoid center and matrix. % % See also CONELLIPSOID, CONBASE/SETACTIVEINDICES, CONBASE/GETACTIVEINDICES. % Copyright 2005 The MathWorks, Inc. % Set the active indices in the parent object con.conbase = setActiveIndices( con.conbase, ai ); % Get the active factors cif = getActiveFactors( con ); % By default, choose the center of the range con.xc = 0.5 * (cif.Max + cif.Min); % By default, choose the ellipse to touch the center of each face of the % bounding box con.W = diag( 1./(0.5 * (cif.Max - cif.Min)).^2 ); %------------------------------------------------------------------------------| % EOF %------------------------------------------------------------------------------|