www.pudn.com > tfarma10.rar > param_expand.m, change:2004-02-23,size:1833b

function Cnm= param_expand(Cml, N, btype) % function Cnm= param_expand(Cml, N, btype) % This file is part of the TFPM toolbox v1.0 (c) % michael.jachan@tuwien.ac.at and underlies the GPL. % % Expands the TVAR/MA coefficient matrix Cml into time-varying % parameter matrix Cnm. The string type determines the basis % functions: % 'exp' : f_l[n]= exp(j*2*pi/N*l*n) complex exponentials (TF models) % 'poly': f_l[n]= xi[l];n^l polynomials (normalized by xi[l]!) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if(0)% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear;tfpm; MAR = 7; LAR = 5; MMA = 5; LMA = 3; N = 64; re_im= 'i'; mo_no= 'm'; tfpm_file_gen; %------------- Cml= Aml; alpha= 1/2; btype= 'poly';Cml= real(Cml); btype= 'exp'; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end;% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if(nargin==2) btype= 'exp'; end; % Dimensions: [M, L]= param_dim(Cml); % Compute a ((M+1)xN) matrix of parameter values switch(btype) case 'exp'% FFT implementation;) Cnm= ifft([Cml(L+1:2*L+1, :); zeros(N-2*L-1, M+1); Cml(1:L, :)])*N; otherwise% Slow inner products:( % [L, M]= size(Cml);L= L-1; M=M-1; Cnm= param_basis(N, L, btype)*Cml; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if(0)% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% figure(98);plot(real(Cnm)) figure(99);plot(imag(Cnm)) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end;% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%