www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@constar/pCodeData.m

    function X = pCodeData(con, X)
%PCODEDATA Code data for use by the model held by a CONSTAR constraint
%
%  X = PCODEDATA(CON, X)
%
%  The input X should have the correct factors for input to the model. You can
%  use PFILTERFACTORS to extract the correct columns.
%
%  X should not be adjusted for the center in any way. This is performed as
%  part of the coding.
%
%  The coding is set-up by PSETMODELCODING.
%
%  See also CONSTAR, 
%           CONBASE/PFILTERFACTORS,
%           CONSTAR/PCODEDATA, 
%           CONSTAR/PINVERSECODEDATA.

%  Copyright 2004-2005 The MathWorks, Inc.

X = code( con.Model, X - repmat( con.Center, size( X, 1 ), 1 ) );

%------------------------------------------------------------------------------|
% EOF
%------------------------------------------------------------------------------|