param_basis.m
来自「用于模拟时变非平稳的ARMA过程」· M 代码 · 共 57 行
M
57 行
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%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?