Can I set a range for spectrogram Analysis
古いコメントを表示
Hi All,
my signal data has a variable frequency(around 50HZ). Can I set a frequency range for spectrogram analysis?
I want to determine the exact frequency according to time
My code is listed below.
Thank you ALL!
Ivy
clear all;
clc;
Fs=1000;
T=1/Fs;
L=1000;
t=(0:L-1)*T;
for i=1:1:10000 %variable frquency signal.
x(i)=0.7*sin(2*pi*(50+rand)*T*(i-1));
end
NFFT =1024;
[S,F,T,P] = spectrogram(x,1024,1000,1024,1E3);
[c,index]=max(P);
surf(T,F,10*log10(P),'edgecolor','none'); axis tight;
view(0,90);
採用された回答
その他の回答 (1 件)
Daniel Shub
2011 年 8 月 1 日
1 投票
You cannot set the frequency range for spectrogram analysis using the spectrogram function. You can, however, perform a short-time Fourier analysis with the freqz function. The freqz function lets you focus your NFFT frequency bins where you want them, as opposed to uniformly throughout the entire frequency range. This approach would require you to write code for the windowing of your signal.
カテゴリ
ヘルプ センター および File Exchange で Time-Frequency Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!