www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregtwostage/compress.m
function TS = compress(TS,EvalMode) %COMPRESS reduce amount of information stored in model % % m = compress(m) % Copyright 2006-2009 The MathWorks, Inc. if nargin<2 EvalMode=0; end for i=1:length(TS.Global) TS.Global{i} = compress(TS.Global{i}); TS.Global{i} = removePEV(TS.Global{i}); end if isa(TS.datum,'xregmodel') TS.datum = compress(TS.datum); TS.datum = removePEV(TS.datum); end TS.Local = compress(TS.Local); TS.Local = removePEV(TS.Local); % make sure variance is a full matrix [ri,s2,df]= var(TS); TS = var(TS,full(ri),s2,df); TS.xregmodel = compress(TS.xregmodel,EvalMode);