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

    function m = mbcinputfactor(cif)
%MBCINPUTFACTOR Construct a mbcinputfactor object from a CONINPUTFACTOR.
%
%  M = MBCINPUTFACTOR(CIF) 
%  All of the inputs including the coding, is set-up from
%  the input factor (CIF) information.
%
%  See also CONINPUTFACTOR, XREGMODEL.

%  Copyright 2007 The MathWorks, Inc. and Ford Global Technologies, Inc.

nf = length( cif );

% Create the model
m = mbcinputfactor( nf );

% Set coding
src = [getMin( cif ); getMax( cif )].';
m = setcode( m, src, [], src );

% Set the factor info
xi = xinfo( m );
xi.Names   = cif.Name.';
xi.Units   = cif.Unit.';
xi.Symbols = cif.Symbol.';
m = xinfo( m, xi );

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