Effacer les filtres
Effacer les filtres

time-frequency

2 vues (au cours des 30 derniers jours)
Sravantej
Sravantej le 24 Jan 2012
Commenté : nour yousfi le 6 Sep 2016
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

Réponses (1)

Wayne King
Wayne King le 24 Jan 2012
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 commentaire
nour yousfi
nour yousfi le 6 Sep 2016
Hi;how can I obtain CWT plots at specific frequencies

Connectez-vous pour commenter.

Catégories

En savoir plus sur Time-Frequency Analysis dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by