FR2COMB Combination matrix for placing out cycles given the frequency matrix
Calculates the counting distribution given the frequency matrix. | |
Extract upper triangular part. |
Generates a stationary residual from the frequency matrix. | |
Recontructs a load process given the frequency matrix (and residual). |
001 function comb=fr2comb(f,r) 002 %FR2COMB Combination matrix for placing out cycles given the frequency matrix 003 004 % Given the frequency matrix of a cycle count the function 005 % calculates the combination matrix for placing out cycles 006 007 % Copyright 1993, Mats Frendahl & Igor Rychlik, 008 % Dept. of Math. Stat., University of Lund. 009 010 nres=length(r); 011 012 N=length(f); nt=fr2nt(f); comb=zeros(N,N); 013 014 for i=1:N 015 for j=1:N-i+1 016 comb(i,j)=2*nt(i,j)+sum(f(1:i-1,j))+sum(f(i,1:j-1)); 017 end 018 end 019 020 for k=1:length(r)-1 021 i=r(k); j=r(k+1); 022 if ~isempty(j+1:i) %i>j+1 023 M=j+1:i; m=N+1-M; 024 comb(M,m)=comb(M,m)+1; 025 elseif ~isempty(i:j-1) %i<j-1 026 M=i:j-1; m=N+1-M; 027 comb(M,m)=comb(M,m)+1; 028 end 029 end 030 031 comb=fliplr(triu(fliplr(comb),1)); 032
Comments or corrections to the WAFO group