MATLAB toolbox wavelet time-frequency
1 次查看(过去 30 天)
显示 更早的评论
[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 个评论
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 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Wavelet Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!