Filter löschen
Filter löschen

time-frequency

2 Ansichten (letzte 30 Tage)
Sravantej
Sravantej am 24 Jan. 2012
Kommentiert: nour yousfi am 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

Antworten (1)

Wayne King
Wayne King am 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 Kommentar
nour yousfi
nour yousfi am 6 Sep. 2016
Hi;how can I obtain CWT plots at specific frequencies

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Time-Frequency Analysis finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by