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

« back to all changes in this revision

Viewing changes to inst/wavelets/dtwfbbounds.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:
 
1
function [AF,BF]=dtwfbbounds(dualwt,L)
 
2
%-*- texinfo -*-
 
3
%@deftypefn {Function} dtwfbbounds
 
4
%@verbatim
 
5
%DTWFBBOUNDS Frame bounds of DTWFB
 
6
%   Usage: fcond=dtwfbbounds(dualwt,L);
 
7
%          [A,B]=dtwfbbounds(dualwt,L);
 
8
%          [...]=dtwfbbounds(dualwt);
 
9
%
 
10
%   DTWFBBOUNDS(dualwt,L) calculates the ratio B/A of the frame bounds
 
11
%   of the dual-tree filterbank specified by dualwt for a system of 
 
12
%   length L. The ratio is a measure of the stability of the system.
 
13
%
 
14
%   DTWFBBOUNDS(dualwt) does the same thing, but L is the next compatible 
 
15
%   length bigger than the longest filter in the identical filterbank.
 
16
%
 
17
%   [A,B]=DTWFBBOUNDS(...) returns the lower and upper frame bounds
 
18
%   explicitly.
 
19
%
 
20
%   See DTWFB for explanation of parameter dualwt.
 
21
%
 
22
%
 
23
%@end verbatim
 
24
%@strong{Url}: @url{http://ltfat.github.io/doc/wavelets/dtwfbbounds.html}
 
25
%@seealso{dtwfb, filterbankbounds}
 
26
%@end deftypefn
 
27
 
 
28
% Copyright (C) 2005-2015 Peter L. Soendergaard <peter@sonderport.dk>.
 
29
% This file is part of LTFAT version 2.1.0
 
30
%
 
31
% This program is free software: you can redistribute it and/or modify
 
32
% it under the terms of the GNU General Public License as published by
 
33
% the Free Software Foundation, either version 3 of the License, or
 
34
% (at your option) any later version.
 
35
%
 
36
% This program is distributed in the hope that it will be useful,
 
37
% but WITHOUT ANY WARRANTY; without even the implied warranty of
 
38
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
39
% GNU General Public License for more details.
 
40
%
 
41
% You should have received a copy of the GNU General Public License
 
42
% along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
43
 
 
44
% AUTHOR: Zdenek Prusa
 
45
 
 
46
complainif_notenoughargs(nargin,1,'DTWFBBOUNDS');
 
47
 
 
48
dualwt = dtwfbinit({'strict',dualwt},'nat');
 
49
 
 
50
if nargin<2 
 
51
    L = [];
 
52
end;
 
53
 
 
54
if ~isempty(L)
 
55
   if L~=wfbtlength(L,dualwt)
 
56
          error(['%s: Specified length L is incompatible with the length of ' ...
 
57
                 'the time shifts.'],upper(mfilename));
 
58
   end
 
59
end
 
60
 
 
61
% Do the equivalent filterbank using multirate identity property
 
62
[gmultid,amultid] = dtwfb2filterbank(dualwt,'complex');
 
63
 
 
64
if isempty(L)
 
65
   L = wfbtlength(max(cellfun(@(gEl) numel(gEl.h),gmultid)),dualwt);  
 
66
end
 
67
 
 
68
 
 
69
% Do the equivalent uniform filterbank
 
70
[gu,au] = nonu2ufilterbank(gmultid,amultid);
 
71
 
 
72
if nargout<2
 
73
   AF = filterbankbounds(gu,au,L);
 
74
elseif nargout == 2
 
75
   [AF, BF] = filterbankbounds(gu,au,L);
 
76
end
 
77
 
 
78