spectrogram and sampling rate

4 ビュー (過去 30 日間)
MatG
MatG 2018 年 7 月 27 日
I have a signal with the following characteristics. I’m using the following code snippet to get the "spectrogram" which does not seem right as I do not see a 10 MHz frequency bandwidth which I know is the frequency change of the signal. I am thinking that I may not be using the right window size. I am not sure what is a good relation between sample length, sample frequency, and window size to get the spectrogram. When I use the code with mathworks examples (https://www.mathworks.com/help/signal/ref/spectrogram.html) , they are fine. But I am thinking since my sampling frequency for my signal is so high, the windows are not set properly for the spectrogram command.
%signal characteristics Signal type: linear chirp increasing 10 MHz. Sampling rate = 61.44e6 samples/second Bandwidth = 10 MHz. The length of the signal (sig) is 4,259,840 samples, which I think becomes (4,259,840 /61.44e6) = 0.0693 seconds.
% Window duration (in seconds): dur = 0.0693/100;
% Spectrogram settings (in samples): winSize = round(sample_rate*dur); overlap = round(winSize/2); fftSize = winSize; % Plot the spectrogram: spectrogram(sig,winSize,overlap,fftSize,sample_rate,'yaxis');
dur = 0.0693/1000000; % Spectrogram settings (in samples): winSize = round(sample_rate*dur); overlap = round(winSize/2); fftSize = winSize; % Plot the spectrogram: spectrogram(sig,winSize,overlap,fftSize,sample_rate,'yaxis');

回答 (0 件)

カテゴリ

Help Center および File ExchangeTime-Frequency Analysis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by