i want frequency domain spectrum of an audio file but i am not getting right frequency range. it is showing freq. range upto 100 kHz but i want to get it upto 10 kHz. what is the problem in frequency range?
3 ビュー (過去 30 日間)
古いコメントを表示
yfft=fft(y); % fft of original signal
f=-length(y)/2:length(y)/2-1;
k=20*log10(abs(yfft));
plot(f,k);
0 件のコメント
採用された回答
Honglei Chen
2013 年 4 月 25 日
Your f is incorrect, assuming the number of elements in y is even, it should be
N = length(y);
f = (-1/2:1/N:1/2-1/N)*fs;
where fs is the sample rate. Whether it maps to 10 kHz or not depends on your sample rate.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Audio Processing Algorithm Design についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!