Why my mel filters do not overlap on each other?

2 ビュー (過去 30 日間)
cat0530
cat0530 2016 年 3 月 18 日
編集済み: cat0530 2016 年 3 月 21 日
The 26 filters should overlap on each other. Could someone help me with this?
  1 件のコメント
Star Strider
Star Strider 2016 年 3 月 18 日
I’ve never used or designed MEL filters. I refer you to: Mel Frequency Cepstral Coefficient (MFCC) tutorial since it seems to be a comprehensive discussion. Compare your code with that discussion.

サインインしてコメントする。

採用された回答

Rick Rosson
Rick Rosson 2016 年 3 月 20 日
編集済み: Rick Rosson 2016 年 3 月 21 日
I think the problem is in the second elseif statement:
elseif (k>=f_range(m+1) && k<=f_range(m))
These two sub-conditions are mutually exclusive, so this condition is always false. As a result, the line after this condition, which creates the right half of the triangle, is never executed.
Please try:
elseif (k>f_range(m) && k<=f_range(m+1))
That being said, there are much easier and more efficient ways to create the filter bank in MATLAB, for example:
  • logical indexing
  • the tripuls function
  2 件のコメント
Rick Rosson
Rick Rosson 2016 年 3 月 21 日
You need to create 2 extra points in f_range. So replace the following two lines:
%Need 26 points spaced linearly between minfreq and maxfreq
f_range = linspace(minMel, maxMel, nfilts);
with these two:
%Need 28 points spaced linearly between minfreq and maxfreq
f_range = linspace(minMel, maxMel, nfilts+2);

サインインしてコメントする。

その他の回答 (1 件)

Rick Rosson
Rick Rosson 2016 年 3 月 20 日
編集済み: Rick Rosson 2016 年 3 月 20 日
Please review the tripuls function.
  2 件のコメント
Rick Rosson
Rick Rosson 2016 年 3 月 20 日
It will work. I've used it successfully.

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by