www.pudn.com > tfarma10.rar > ker_to_lag_non.m, change:2004-02-05,size:1569b

function Halpha= ker_to_lag_non(H, MAX_M_LAG, alpha) % function Halpha= ker_to_lag_non(H, MAX_M_LAG, alpha) % This file is part of the TFPM toolbox v1.0 (c) % michael.jachan@tuwien.ac.at and underlies the GPL. % % A 2D signal H[n, n'], 0 <= n, n' <= N-1 is given. Its generalized % form Halpha[n, m], 0 <= n <= N-1, -MAX_M_LAG <= m <= MAX_M_LAG is % computed. alpha may only be +/-1/2! If MAX_M_LAG==-1 then % m<=-N/2<=N/2-1, i.e., a square FFT-ready matrix! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if(0)% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear;tfpm; MAR = 0; LAR = 0; MMA = 2; LMA = 0; N = 8; re_im= 'r'; mo_no= 'm'; tfpm_file_gen; %------------- H= tvarma_impr(Anm, Bnm); MAX_M_LAG= -1; alpha= -1/2; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end;% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Dimensions: N= size(H, 1); if(MAX_M_LAG==-1) square= 1; MAX_M_LAG= N/2-1; else square= 0; end; Halpha= zeros(N, 2*MAX_M_LAG+1+square); if(alpha==1/2) for n= 0:N-1 row= [zeros(1, n) fliplr(H(n+1, :)) zeros(1, N-1-n)]; Halpha(n+1, :)= row(N-MAX_M_LAG-square:N+MAX_M_LAG); end; elseif(alpha==-1/2) for n= 0:N-1 row= [zeros(1, N-1-n) H(:, n+1).' zeros(1, n)]; Halpha(n+1, :)= row(N-MAX_M_LAG-square:N+MAX_M_LAG); end; else disp('ker_to_lag.m: alpha must be +1/2 or -1/2!'); Halpha= []; end;