www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregcovariance/ar1.m
function [w,bnds]= ar1(c,yhat,X,varargin); % COVMODEL/AR1 Auto-regressive model of order 1 % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. % if length(X)<3 | all(abs( diff(X,2) ) < norm(X)*1e-8; if nargin==1 w= 1; bnds= [-1+1.0e-8 1-1.0e-8]; else w= c.cparam(1).^(0:length(yhat)-1); w= toeplitz(w); end