필터 지우기
필터 지우기

MATLAB toolbox wavelet time-frequency

조회 수: 2 (최근 30일)
Godefroy
Godefroy 2011년 5월 26일
[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
Godefroy
Godefroy 2011년 5월 27일
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 2011년 11월 25일
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

댓글을 달려면 로그인하십시오.

답변 (1개)

Doug Hull
Doug Hull 2012년 9월 17일
answered in comments

카테고리

Help CenterFile Exchange에서 Wavelet Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by