Efficiently computing a LARGE spectrogram
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello,
I need to creat a spectrogram of a 6 minutes WAV file of 44100 Hz sampling rate. This is my code at the moment:
[s,fs] = audioread(...); % read the mono file
window = blackmanharris(2048);
noverlap = 1024*3/2;
nfft = fs/5; % for about 5Hz resolution, also tried 2^13 or 2^14
[~,f,t,p] = spectrogram(s,window,noverlap,nfft,fs);
but the computation never finishes and I need to kill Matlab. I think the system is running out of memory (8GB on OS X ).
Is there a way to make it finish?
댓글 수: 2
Adam
2015년 3월 10일
Do you need 5Hz resolution? That sounds pretty small for frequencies up to 44100. Maybe it is needed though. I work with seismic signals personally where sample frequencies there are more like 250-1000 Hz so I'm not familiar with signals of your length and sample rate.
You could also try reducing the overlap, but if you want that level of quality you may have to do it in chunks instead of all in one go.
It is a windowed transform so can clearly be broken down into sections that can be run independently of each other.
답변 (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!