~ubuntu-branches/ubuntu/wily/octave-ltfat/wily-proposed

« back to all changes in this revision

Viewing changes to inst/filterbank/erbfilters.m

  • Committer: Package Import Robot
  • Author(s): Sébastien Villemot, Rafael Laboissiere
  • Date: 2015-07-18 23:36:41 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20150718233641-jhuf3f551a3523qc
Tags: 2.1.0+dfsg-1
* Team upload.

[ Rafael Laboissiere ]
* Imported Upstream version 2.1.0+dfsg
* d/rules: Prevent unit testing on armhf and mips.
  This avoids FTBFS on theses architectures (see Bug#765545).
* Unit testing does not need X-window anymore
  + d/rules: Do not use xfvb-run to run the tests.
  + d/control: Drop xauth, xvfb, and gnuplot-nox from Build-Depends.
    Also, the versioned dependency on octave-pkg-dev is relaxed.
* Drop .jar file from upstream tarball, complying with the Debian Policy
  + d/copyright: Exclude file blockproc.jar
  + d/rules: Add get-orig-source target
  + d/watch: Mangle upstream version to cope with "+dfsg" tag
* Build blockproc.jar, which is deleted from the upstream tarball
  + d/rules: Add commands for building blockproc.jar
  + d/control: Build-depend on default-jdk
  + d/p/fix-path-of-included-makefile.patch: New patch
* Bump Standard-Versions to 3.9.6 (no changes needed)
* d/p/autoload-yes.patch: Remove patch (deprecated upstream)
* Bump Build-Depends on octave to >> 4.0.0~rc4-1 (for sndfile support)
* d/check.m: Avoid verbose output of unit tests
* d/watch: Add the repacksuffix option
* d/p/add-hardening-flags.patch: Drop patch (applied upstream)
* d/p/fix-path-of-included-makefile.patch: Drop patch (applied upstream)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
%   By default, a Hann window on the frequency side is choosen, but the
26
26
%   window can be changed by passing any of the window types from
27
27
%   FIRWIN as an optional parameter.
 
28
%   Run getfield(getfield(arg_firwin,'flags'),'wintype') to get a cell
 
29
%   array of window types available.
28
30
%
29
 
%   Because the downsampling rates of the channels must all divide the
30
 
%   signal length, FILTERBANK will only work for multiples of the
31
 
%   least common multiple of the downsampling rates. See the help of
32
 
%   FILTERBANKLENGTH.
 
31
%   The integer downsampling rates of the channels must all divide the
 
32
%   signal length, FILTERBANK will only work for input signal lengths
 
33
%   being multiples of the least common multiple of the downsampling rates.
 
34
%   See the help of FILTERBANKLENGTH. 
 
35
%   The fractional downsampling rates restrict the filterbank to a single
 
36
%   length L=Ls.
33
37
%
34
38
%   [g,a]=ERBFILTERS(...,'regsampling') constructs a non-uniform
35
39
%   filterbank with integer subsampling factors.
36
40
%
37
41
%   [g,a]=ERBFILTERS(...,'uniform') constructs a uniform filterbank
38
 
%   where the downsampling rate is the same for all the channels. This
39
 
%   results in most redundant representation, which produces nice plots.
 
42
%   where the integer downsampling rate is the same for all the channels. This
 
43
%   results in most redundant representation which produces nice plots.
40
44
%
41
45
%   [g,a]=ERBFILTERS(...,'fractional') constructs a filterbank with
42
 
%   fractional downsampling rates a. The rates are constructed such
43
 
%   that the filterbank can handle signal lengths that are multiples of
44
 
%   L, so the benefit of the fractional downsampling is that you get to
45
 
%   choose the value returned by FILTERBANKLENGTH. This results in the
46
 
%   least redundant system.
 
46
%   fractional downsampling rates a. 
 
47
%   This results in the least redundant system.
47
48
%
48
49
%   [g,a]=ERBFILTERS(...,'fractionaluniform') constructs a filterbank with
49
50
%   fractional downsampling rates a, which are uniform for all filters
68
69
%                      system may no longer be painless.
69
70
%
70
71
%     'symmetric'     Create filters that are symmetric around their centre
71
 
%                     frequency. This is the default.
 
72
%                     frequency. This is the default.'sqrtsquare','sqrtrect'
72
73
%
73
74
%     'warped'        Create asymmetric filters that are symmetric on the
74
75
%                     Erb-scale.
137
138
%     Vancouver, Canada, May 2013. IEEE.
138
139
%     
139
140
%@end verbatim
140
 
%@strong{Url}: @url{http://ltfat.sourceforge.net/doc/filterbank/erbfilters.php}
 
141
%@strong{Url}: @url{http://ltfat.github.io/doc/filterbank/erbfilters.html}
141
142
%@seealso{filterbank, ufilterbank, ifilterbank, ceil23}
142
143
%@end deftypefn
143
144
 
144
 
% Copyright (C) 2005-2014 Peter L. Soendergaard <soender@users.sourceforge.net>.
145
 
% This file is part of LTFAT version 2.0.1
 
145
% Copyright (C) 2005-2015 Peter L. Soendergaard <peter@sonderport.dk>.
 
146
% This file is part of LTFAT version 2.1.0
146
147
%
147
148
% This program is free software: you can redistribute it and/or modify
148
149
% it under the terms of the GNU General Public License as published by
302
303
                   'inf','min_win',kv.min_win);
303
304
    end
304
305
else
305
 
    g=warpedblfilter(flags.wintype,fsupp_erb,fc,fs,@freqtoerb,@erbtofreq, ...
306
 
                     'scal',scal,'inf');
 
306
    g = cell(1,numel(fc));
 
307
    for m=1:numel(g)
 
308
        g{m}=warpedblfilter(flags.wintype,fsupp_erb,fc(m),fs,@freqtoerb,@erbtofreq, ...
 
309
                     'scal',scal(m),'inf');
 
310
    end
307
311
end;
308
312
 
309
313
end