time-frequency

2 次查看(过去 30 天)
Sravantej
Sravantej 2012-1-24
hi, i have a signal whose frequency is varying with time, i need to know the frequencies at all the times. I need a plot of the signal frequency vs signal time. Can anyone tell me how to get that plot

回答(1 个)

Wayne King
Wayne King 2012-1-24
Hi Sravantej, You have to understand that there are constraints on how precise you can obtain a time-frequency analysis of a signal.
Having said that, you can use spectrogram in the Signal Processing Toolbox and/or cwtft in the Wavelet Toolbox.
Here is an example with spectrogram:
t=0:0.001:2;
x=chirp(t,0,1,150);
[y,f,t,p] = spectrogram(x,256,250,1000);
surf(t,f,10*log10(abs(p)),'EdgeColor','none');
axis xy; axis tight; colormap(jet); view(0,90);
xlabel('Time');
ylabel('Frequency (Hz)');
Here is an example with cwtft from the Wavelet Toolbox:
N = 1024;
t = linspace(0,1,N);
dt =1/(N-1);
Y = sin(8*pi*t).*(t<=0.5) + sin(16*pi*t).*(t>0.5);
s0 = 6*dt; ds = 0.15; NbSc = 50;
wname = 'morl';
SCA = {s0,ds,NbSc};
cwtsig = cwtft({Y,dt},'scales',SCA,'wavelet',wname);
MorletFourierFactor = 4*pi/(6+sqrt(2+6^2));
Scales = cwtsig.scales.*MorletFourierFactor;
Freq = 1./Scales;
imagesc(t,[],abs(cwtsig.cfs));
indices = get(gca,'ytick');
set(gca,'yticklabel',Freq(indices));
xlabel('Time'); ylabel('Hz');
title('Time-Frequency Analysis with CWT');
  1 个评论
nour yousfi
nour yousfi 2016-9-6
Hi;how can I obtain CWT plots at specific frequencies

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Continuous Wavelet Transforms 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by