Creating an accurate Doppler spectrogram visualization
이전 댓글 표시
Hello! I'm trying to view and listen to an audio file (Doppler file). I want to display the spectrogram and have a scroll bar to navigate through the entire signal. Additionally, I'd like to be able to play or stop the audio.
I need something like this:

And I have this:

Here is my code:
fid = fopen('TCD_01.bin');
block_size = strread(fgetl(fid),'###block_size::%d');
block_number = strread(fgetl(fid),'###block_numbers::%d');
for k=1:8
fgetl(fid)
end
prf = strread(fgetl(fid),'###prf::%d');
offset = block_size * block_number;
fseek(fid,offset,'bof');
a = fread(fid, [4,inf],'float32')';
b1 = complex(a(:,2), a(:,1));
b2 = complex(a(:,4), a(:,3));
Fs=prf
NFFT = 128;
f_vec = [-floor(NFFT/2) : ceil(NFFT/2)-1] * Fs/NFFT;
figure, spectrogram(b1,hamming(128),64,f_vec,Fs,'yaxis');
caxis([0 20])
How can I achieve a result identical to the first part of the first image?
Thank you!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!