www.pudn.com > tfarma10.rar > elmar.m, change:2004-06-04,size:1061b


clear;tfpm;
load('~/matlab/data/elmar/x1.mat')

data= x1(1:128);
N= length(data);
plot(data)

plot(abs(fft(data).^2))
S= specgram(data, 64, [], 64, 63);

figure(10);tf_show(abs(S))
P1= periodogram(data);
plot(P1)

alpha= 1/2;

MAR= 3;
LAR= 2;
Q= corr_est(data, data, MAR, alpha);
A= fft(Q);
A= [A(N/2+1:end, :); A(1:N/2, :)];
mesh(abs(A))


%TFYW TFARmodel

%help tfar_est_tfywu

A= A(N/2+1-3*LAR:N/2+1+3*LAR, :);

[AA, BB]= tfar_est_tfywu(A, N);
Aml= AA(:, :, end);
B0l= BB(:, end);

Anm= param_expand(Aml, N);

[TDIRnm, TDIRn0]= param_tdir(Anm);
%param_plot('exp', N, 0, 'r', 'g', Aml, 1, 1, 2, 3, 4, 5, B0l, 0, 0, ...
%	   0, 0, 0, 0);
max(max(abs(TDIRnm)))

PAR= tfarma_wvsp(Aml, B0l, N, alpha);

figure(10);tf_show(abs(S))
figure(11);tf_show(rot90(abs(PAR(:, 1:N/2))))

help tfarma_inv





%TFMA

%help tfma_est_cepsb
Q= corr_est(data, data, -1, alpha);
A= fft(Q);
A= [A(N/2+1:end, :); A(1:N/2, :)];
mesh(abs(A))

MMA= 3
LMA= 2

[B, REG, PMIN]= tfma_est_cepsb(A, MMA, LMA);
PMA= tfarma_wvsp(1, B, N, alpha);

figure(12);tf_show(rot90(abs(PMA(:, 1:N/2))))