Mercurial > hg > camir-aes2014
comparison toolboxes/MIRtoolbox1.3.2/AuditoryToolbox/ERBSpace.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e9a9cd732c1e |
---|---|
1 function cfArray = ERBSpace(lowFreq, highFreq, N) | |
2 % function cfArray = ERBSpace(lowFreq, highFreq, N) | |
3 % This function computes an array of N frequencies uniformly spaced between | |
4 % highFreq and lowFreq on an ERB scale. N is set to 100 if not specified. | |
5 % | |
6 % See also linspace, logspace, MakeERBCoeffs, MakeERBFilters. | |
7 % | |
8 % For a definition of ERB, see Moore, B. C. J., and Glasberg, B. R. (1983). | |
9 % "Suggested formulae for calculating auditory-filter bandwidths and | |
10 % excitation patterns," J. Acoust. Soc. Am. 74, 750-753. | |
11 | |
12 if nargin < 1 | |
13 lowFreq = 100; | |
14 end | |
15 | |
16 if nargin < 2 | |
17 highFreq = 44100/4; | |
18 end | |
19 | |
20 if nargin < 3 | |
21 N = 100; | |
22 end | |
23 | |
24 % Change the following three parameters if you wish to use a different | |
25 % ERB scale. Must change in MakeERBCoeffs too. | |
26 EarQ = 9.26449; % Glasberg and Moore Parameters | |
27 minBW = 24.7; | |
28 order = 1; | |
29 | |
30 % All of the followFreqing expressions are derived in Apple TR #35, "An | |
31 % Efficient Implementation of the Patterson-Holdsworth Cochlear | |
32 % Filter Bank." See pages 33-34. | |
33 cfArray = -(EarQ*minBW) + exp((1:N)'*(-log(highFreq + EarQ*minBW) + ... | |
34 log(lowFreq + EarQ*minBW))/N) * (highFreq + EarQ*minBW); | |
35 |