1 function [BIACF,ACF,M1] = biacovf(Z,N);
2 % BiAutoCovariance function
3 % [BiACF] = biacovf(Z,N);
7 % Output: BIACF bi-autocorrelation function (joint cumulant 3rd order
8 % Output: ACF covariance function (joint cumulant 2nd order)
10 % $Id: biacovf.m 5090 2008-06-05 08:12:04Z schloegl $
11 % Copyright (C) 1997, 1998, 2008 by Alois Schloegl <a.schloegl@ieee.org>
13 % This program is free software: you can redistribute it and/or modify
14 % it under the terms of the GNU General Public License as published by
15 % the Free Software Foundation, either version 3 of the License, or
16 % (at your option) any later version.
18 % This program is distributed in the hope that it will be useful,
19 % but WITHOUT ANY WARRANTY; without even the implied warranty of
20 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 % GNU General Public License for more details.
23 % You should have received a copy of the GNU General Public License
24 % along with this program. If not, see <http://www.gnu.org/licenses/>.
36 tmp=Z(1:M-K).*Z(1+K:M);
39 BIACF(K+1,L+1) = sum(tmp(1:M-L).*Z(1+L:M))/M;
43 BIACF=BIACF+BIACF'-diag(diag(BIACF));