Effacer les filtres
Effacer les filtres

MATLAB toolbox wavelet time-frequency

2 vues (au cours des 30 derniers jours)
Godefroy
Godefroy le 26 Mai 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 commentaires
Godefroy
Godefroy le 27 Mai 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 le 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

Connectez-vous pour commenter.

Réponses (1)

Doug Hull
Doug Hull le 17 Sep 2012
answered in comments

Catégories

En savoir plus sur Wavelet Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by