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


function Fln= param_basis(N, L, btype)
% function Fln= param_basis(N, L, btype)
%   This file is part of the TFPM toolbox v1.0 (c)
%   michael.jachan@tuwien.ac.at and underlies the GPL.
% 
% Computes f_l[n]. The string btype determines the basis functions: 
% 'exp' : complex exponentials (TF models), 
% 'poly': orthonormal polynomials (Chebychev). 
% All bases generated are orthonormal, but not really!
% (energy(Fln)= N*(L+1);). L ranges always from -L:L. 
% if(btype~='exp') the negative indexed functions are == 0! 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if(0)% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear;tfpm;
N    =  64;
MAR  =   7;
LAR  =   5;
MMA  =   5;
LMA  =   3;
re_im= 'i';
mo_no= 'm';
tfpm_file_gen;
%-------------
L    = LAR;

btype= 'poly';
%btype= 'exp';
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end;% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

if(nargin==2)
   btype= 'exp';
end;

switch(btype)
 case 'exp'
  Fln= exp(2*pi*j/N*(0:N-1)'*(-L:L));
 case 'poly'
  Fln= ( (0:N-1)'*ones(1, L+1) ).^( ones(N, 1)*(0:L) );
  [Q, R]=qr(Fln);
  Fln= -Q(:, 1:L+1)*sqrt(N);
  Fln= [zeros(N, L) Fln];
end;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if(0)% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sum(abs(Fln).^2)
figure(98);plot(real(Fln))
figure(99);plot(imag(Fln))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end;% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%