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

« back to all changes in this revision

Viewing changes to inst/blockproc/blockplot.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 cola=blockplot(p,F,c,cola)
 
1
function cola=blockplot(p,arg0,arg1,cola)
2
2
%-*- texinfo -*-
3
3
%@deftypefn {Function} blockplot
4
4
%@verbatim
5
5
%BLOCKPLOT Plot block coefficients
6
 
%   Usage: blockplot(p,F,c);
 
6
%   Usage: blockplot(p,c);
 
7
%          blockplot(p,F,c);
 
8
%          blockplot(p,F,c,cola);
7
9
%
8
10
%   Input parameters:
9
11
%         p     : JAVA object of the class net.sourceforge.ltfat.SpectFrame.
17
19
%   BLOCKPLOT(p,F,c) appends the block coefficients c to the running 
18
20
%   coefficient plot in p. The coefficients must have been obtained by
19
21
%   c=blockana(F,...). The format of c is changed to a rectangular 
20
 
%   layout according to the type of F.
21
 
%
22
 
%   BLOCKPLOT(p,[],c) does the same, but expects c to be already
23
 
%   formatted matrix of real numbers. The matrix dimensions are not
24
 
%   restricted, but it will be shrinked or expanded to a vertical
25
 
%   strip in the sliding image.
 
22
%   layout according to the type of F. p must be a Java object with a
 
23
%   append method.  
26
24
%
27
25
%   cola=BLOCKPLOT(p,F,c,cola) does the same, but adds cola to the 
28
26
%   first respective coefficients in c and returns last coefficients from
29
27
%   c. This is only relevant for the sliced window blocking approach.
30
28
%
 
29
%   BLOCKPLOT(p,c) or BLOCKPLOT(p,[],c) does the same, but expects c 
 
30
%   to be already formatted matrix of real numbers. The data dimensions
 
31
%   are not restricted, but it will be shrinked or expanded to fit with
 
32
%   the running plot.
 
33
%
31
34
%@end verbatim
32
 
%@strong{Url}: @url{http://ltfat.sourceforge.net/doc/blockproc/blockplot.php}
 
35
%@strong{Url}: @url{http://ltfat.github.io/doc/blockproc/blockplot.html}
33
36
%@end deftypefn
34
37
 
35
 
% Copyright (C) 2005-2014 Peter L. Soendergaard <soender@users.sourceforge.net>.
36
 
% This file is part of LTFAT version 2.0.1
 
38
% Copyright (C) 2005-2015 Peter L. Soendergaard <peter@sonderport.dk>.
 
39
% This file is part of LTFAT version 2.1.0
37
40
%
38
41
% This program is free software: you can redistribute it and/or modify
39
42
% it under the terms of the GNU General Public License as published by
48
51
% You should have received a copy of the GNU General Public License
49
52
% along with this program.  If not, see <http://www.gnu.org/licenses/>.
50
53
 
51
 
complainif_notenoughargs(nargin,3,'BLOCKPLOT');
52
 
complainif_notvalidframeobj(F,'BLOCKPLOT');
53
 
 
54
 
 
55
 
if ~isempty(F)
 
54
complainif_notenoughargs(nargin,2,'BLOCKPLOT');
 
55
 
 
56
if ~isempty(arg0) && isstruct(arg0) && isfield(arg0,'frana')
 
57
    F = arg0;
 
58
    c = arg1;
 
59
    complainif_notenoughargs(nargin,3,'BLOCKPLOT');
 
60
    complainif_notvalidframeobj(F,'BLOCKPLOT');
56
61
    if size(c,2)>1
57
62
        error('%s: Only one channel input is supported.',upper(mfilename));
58
63
    end
77
82
    
78
83
    ctf = abs(ctf);
79
84
else
 
85
    if ~isempty(arg0)
 
86
        c = arg0;
 
87
    elseif nargin>2
 
88
        c = arg1;
 
89
    else
 
90
        error('%s: Not enough input arguments',upper(mfilename));
 
91
    end
80
92
    if ~isreal(c)
81
93
        error('%s: Complex values are not supported',upper(mfilename));
82
94
    end
83
95
    ctf = c;
84
96
end
85
97
 
86
 
 
87
98
if isoctave
88
99
   % The JAVA 2D-array handling is row-major
89
100
   ctf = cast(ctf,'double').';