[Pkg-octave-commit] [SCM] Debian packaging for octave-signal branch, master, updated. upstream/1.1.2-16-gaee1bc7

Rafael Laboissiere rafael at laboissiere.net
Sat Mar 10 10:11:17 UTC 2012


The following commit has been merged in the master branch:
commit 6e16b98c7d58f601dedd59d7d3928345e9e47aa8
Author: Rafael Laboissiere <rafael at laboissiere.net>
Date:   Sat Mar 10 09:37:14 2012 +0000

    Add patch for fixing test of fir1

diff --git a/.gitignore b/.gitignore
index 41c6dac..6e6c45c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.pc/
 debian/files
 debian/octave-signal*
 global-list
diff --git a/debian/patches/accept-string-as-window-argument.patch b/debian/patches/accept-string-as-window-argument.patch
new file mode 100644
index 0000000..2dbb62b
--- /dev/null
+++ b/debian/patches/accept-string-as-window-argument.patch
@@ -0,0 +1,36 @@
+Description: Make fir1 and fir2 accept window argument as string
+ The functions fir1 and fir2 should accept a string as the "window"
+ argument, in which case, it indicates the name of the function
+ producing the window vector.  Indeed, there is the following test in
+ fir1.m:
+ .
+   assert(fir1(2, .5, 'low', "hanning", 'scale'), [0 1 0]');
+ .
+ This test fails because the behavior of isreal(), changed in Octave
+ 3.6, in which isreal(x), where x is a string, returns true.  Extra
+ tests with ischar() are then needed.
+Author: Rafael Laboissiere <rafael at laboissiere.net>
+Last-Update: 2012-03-10
+
+--- octave-signal-1.1.2.orig/inst/fir2.m
++++ octave-signal-1.1.2/inst/fir2.m
+@@ -81,7 +81,7 @@ function b = fir2(n, f, m, grid_n, ramp_
+   if length(ramp_n)>1, w=ramp_n; ramp_n=grid_n/20; endif
+   if nargin < 6, window=w; endif
+   if isempty(window), window=hamming(n+1); endif
+-  if !isreal(window), window=feval(window, n+1); endif
++  if !isreal(window) || ischar(window), window=feval(window, n+1); endif
+   if length(window) != n+1, usage("window must be of length n+1"); endif
+ 
+   ## make sure grid is big enough for the window
+--- octave-signal-1.1.2.orig/inst/fir1.m
++++ octave-signal-1.1.2/inst/fir1.m
+@@ -92,7 +92,7 @@ function b = fir1(n, w, varargin)
+   if rem(n,2)==1 && m(2*bands)==1, 
+     warning("n must be even for highpass and bandstop filters. Incrementing.");
+     n = n+1;
+-    if isvector(window) && isreal(window)
++    if isvector(window) && isreal(window) && !ischar(window)
+       ## Extend the window using interpolation
+       M = length(window);
+       if M == 1,
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1be32dc
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+accept-string-as-window-argument.patch

-- 
Debian packaging for octave-signal



More information about the Pkg-octave-commit mailing list