Why my mel filters do not overlap on each other?

조회 수: 5 (최근 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
cat0530
cat0530 2016년 3월 21일
Yes, you're right. I've changed the second statement and it works! Now the problem is that only 24 filters are shown in the graph instead of 26. I've tried changing the outer for loop but it says index out of bounds
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
Star Strider
Star Strider 2016년 3월 20일
I’m not certain that will work. When I looked up the MEL filters (that are designed to emulate cochlear frequency responses), the pass-bands were intersecting and looked something like: ...XXXXX...
Rick Rosson
Rick Rosson 2016년 3월 20일
It will work. I've used it successfully.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by