www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregstatsmodel/pev.m
function varargout = pev(m, x, varargin) %PEV Prediction error variance of the model % [PEV, Y] = PEV( MODEL, X ); % X is a(N-by-NF) array, where NF is the number of inputs, and N the % number of points to evaluate the model at. % To calculate a 95% confidence interval use: % yhat = m(X); % level = 0.95; % ylower = yhat + tinv((1-level)/2,dferror(m))*sqrt(pev(m,X)); % yupper = yhat - tinv((1-level)/2,dferror(m))*sqrt(pev(m,X)); % % See also EvalModel, dferror, predint % Copyright 2000-2011 The MathWorks, Inc. and Ford Global Technologies, Inc. % check the number of inputs and outputs narginchk(2,inf); nargoutchk(0,2) NF = nfactors(m); if NF==size(x, 2) [varargout{1:nargout}] = pev( m.mvModel, x, varargin{:} ); else str = ''; if NF>1 str = 's'; end error(message('mbc:xregstatsmodel:InvalidSize1', NF, str)); end