www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregmodel/invcode.m

    function x=invcode(m,x,factnum)
%INVCODE Invert X coding transformation Target -> [min,max]
%
%  x=INVCODE(m,x)
%
%  x=INVCODE(m,x,factornum) inverse codes all the values in x using the
%  coding for the factor specified.  Several factor numbers may be
%  specified, so long  as there are the same number of columns in x.

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



if nargin<3
    factnum = 1:size(x,2);
end

 
Inp = m.Inputs;
if iscell(x)
    for j = 1:length(factnum)
        x{j} = invcode(Inp,x{j},factnum(j));
    end
else
    x = invcode(Inp,x,factnum);
end