www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@constar/pSetModelCoding.m
function con = pSetModelCoding(con) %PSETMODELCODING Sets the coding information for the model held in a CONSTAR constraint. % % CON = PSETMODELCODING(CON) % % The coding is should be performed by PCODEDATA and inverse coding by % PINVERSECODEDATA. % % See also CONSTAR, % CONSTAR/PCODEDATA, % CONSTAR/PINVERSECODEDATA. % %ABOUT CODING % One of the complicated issues with respect to modeling and constraints is % coding the input factors. In order to produce meaningful models, it is % necessary to code the data to some appropriate domain. In the case of RBF % models this domain is [-1,1]^d. However, in the constraint world coding of % this form does not take place as it keeps everything simple. We now get to % star-shaped constraints. These are a little complicated as they exist in an % intersection of these two worlds. % % The RBF model held inside the constraint controls the coding. If any task % needs to happen in coded units, the RBF will perform the necessary coding. % The CENTER of the star-shaped region will be stored in NATURAL UNITS. This % means that any center determination algorithm either has to work in natural % units or do its own scaling of data. % % The coding will be applied to data shifted by the center, i.e., the center of % the coded space will be the coded version of [0,...,0]. % Copyright 2004-2005 The MathWorks, Inc. cif = getActiveFactors( con ); mn = cif.Min - con.Center; mx = cif.Max - con.Center; con.Model = setcode( con.Model, [mn(:), mx(:)] ); %------------------------------------------------------------------------------| % EOF %------------------------------------------------------------------------------|