|
楼主 |
发表于 2007-11-18 16:09
|
显示全部楼层
麻烦zhong及格位高手帮忙分析一下:
感觉TF toolbox 的结果有些莫名其妙!
clear all
%define raw signal
ts=1e-3;tc=0.45;te=1;
tec=0.55;
SampFreq =1/ts;
t=[ts:ts:te];NL=length(t);
fx=zeros(NL,1);
Ntc=tc/ts;Nte=te/ts;
w=100;
for i=1:NL
tt=i*ts;
if (tt>=tc)&(tt<=tec)
fx(i)=5*sin(2*pi*w*(tt-0.45));
end
end
sig=fx';
% complex morlet transform
c = cwt(sig,1:0.1:50,'cmor1-1.5');
mesh(abs(c))
mesh(real(c))
title('Complex morlet1-1.5 transform')
% complex gabor transform from TB toolbox
Nc=500;
Q=50;
Nr=length(sig)*Q/Nc;
[TFR,DGR,GAM]= tfrgabor(sig,Nc,Q);
tc=linspace(t(end)/Nc,t(end),Nc);
fr=linspace(SampFreq/Nr,SampFreq/2,round(Nr/2))';
TFR=TFR(1:round(Nr/2),:);
mesh(tc,fr,TFR);
mesh(tc,fr,real(DGR(1:50,:)))
ylabel('Frequency / Hz');
xlabel('Time / sec'); |
|