Azzera filtri
Azzera filtri

MATLAB toolbox wavelet time-frequency

2 visualizzazioni (ultimi 30 giorni)
Godefroy
Godefroy il 26 Mag 2011
[EDIT: 20110526 02:20 CDT - reformat - WDR]
plan time-frequency with wavelet packets D-1
I have a question about the time-frequency plan.
as the example in wavedemo -> GUI mode -> Wavelet packet D-1.
There are a graphic time-frequency plan.
I show my source code :
fe=100e3;
Te=1/fe;
N=1024;
t=[0:Te:(N-1)*Te];
f0=1000;
f1=50000;
x=chirp(t,f0,(N-1)*Te,f1);
n_tree = 4; %Tree level number
%-------------------------------------------------------
figure;
subplot(2,1,1),plot(x);
title('signal original');
%
wpt = wpdec(x,n_tree,'db4');
plot(wpt);
bt = besttree(wpt);
plot(bt);
for i=1:(2^n_tree)
temp = wpcoef(wpt,[n_tree i-1]);
cfs(i,:) = temp;
end
%subplot(2,1,2),plot(cfs);
figure;
for i=1:(2^n_tree)
subplot((2^n_tree)/2,2,i),plot(cfs(i,:));
%title('partie signal (', n_tree ,',',i-1, ')');
end
cfs=cfs.^6;
figure;
image(cfs);
My problem is the frequency order.
I don't know how do it. i search in the toolbox...
I hope I will have a reply.
regards
  3 Commenti
Godefroy
Godefroy il 27 Mag 2011
the functions "wpdec" and "besttree" give the signal decomposition but the indic is not arranged in frequency order.
for example i want to decompose a chirp in level 2. I will have 4 frequency(as frequency 10 - 20 - 30 - 40 Hz), i should have in frequency order from 10 Hz to 40 Hz. But the function give the order as 10 -> 20 -> 40 -> 30. So i don't known how to have the good order as 10 - 20 - 30 - 40 Hz. I cannot to arrange the order manual because i need to analyze the signal with the tree and level of 4 or 5 or any more.
I hope with this details it will reply to your isssue.
regards
Yang
Yang il 25 Nov 2011
hi, you can use the function "otnodes" to get the correct order. e.g.
wpt = wpdec(x,n_tree,'db4');
[~,tn_Seq,I] = otnodes(wpt);
hope it helps to you

Accedi per commentare.

Risposte (1)

Doug Hull
Doug Hull il 17 Set 2012
answered in comments

Categorie

Scopri di più su Wavelet Toolbox in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by