spectrogram and sampling rate
조회 수: 10 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Time-Frequency Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!