home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l455 / 9.ddi / IDENT.DI$ / COVF2.M < prev    next >
Encoding:
Text File  |  1993-03-11  |  364 b   |  20 lines

  1. function R=covf2(z,M)
  2. %COVF2   Computes covariance function estimates
  3. %
  4. %    R = covf2(Z,M)
  5. %
  6. %    The routine is a subroutine to COVF. See COVF for further
  7. %    details.
  8.  
  9. %    L. Ljung 10-1-86
  10. %    Copyright (c) 1986 by the MathWorks, Inc.
  11. %    All Rights Reserved.
  12.  
  13. [N,nz]=size(z);
  14. z=[z;zeros(M,nz)];
  15. j=[1:N];
  16. for k=1:M
  17. a=z(j,:)'*z(j+k-1,:);
  18. R(:,k)=a(:)/N;
  19. end
  20.