Distribute the values from fft() logarithmically - not plotting
이전 댓글 표시
Hi all,
When I use fft(signal) on a music signal, I get linearly spaced power spectrum of length(signal) representing frequencies up to 44100hz. I want to distribute them on a log scale. If I semilogx(fft(abs(signal))) I can see what I want, but I want to be able to work with the values!
I think the best way to explain exactly what I want to do is explain what I want to achieve on a slightly higher level:
I want to sum the differences on the power spectrum of a music signal from one window to another. However for later purposes I want the (say) 20 frequency bins to be spaced logarithmically up to only 20000Hz.
I hope that explains my problem, please let me know if I should provide more detail. I have looked on google and had a search of this forum. Closest was this question with no answer http://www.mathworks.com.au/matlabcentral/answers/27211-audio-processing
I have:
binEdges = logspace(log10(20), log10(20000), numBins+1);
which defines the bins, but then I don't know how to test for the frequencies in the returned fft array.
Thanks very much for any help!
답변 (3개)
Honglei Chen
2012년 10월 13일
0 개 추천
If your frequency bins falls on frequency bins of an FFT, you can try Goertzel algorithm
카테고리
도움말 센터 및 File Exchange에서 Spectral Measurements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!