You will find attached below four patches that are currently applied
to the Debian package octave-signal (upcoming version 1.1.2-1). They
fix problems in the test suite for some functions. The latest
version of these patches can be found in:
http://anonscm.debian.org/gitweb/?p=pkg-octave/octave-signal.git;a=tree;f=debian/patches
There is also a random failure with the following block, but I did not
investigated the causes:
########################
x=randn(256,1);
[y, xm] = rceps(x);
[yt, xmt] = rceps(x.');
assert(yt.', y);
assert(xmt.', xm);
########################
Best,
Rafael
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 <raf...@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,
Description: Do not use functions deprecated in Octave 3.6
Use corr and polyder instead of the deprecated corrcoef and polyderiv
functions. This will avoid warnings when using Octave 3.6.
Author: Rafael Laboissiere <raf...@laboissiere.net>
Last-Update: 2012-03-10
Index: octave-signal/inst/filtfilt.m
===================================================================
--- octave-signal.orig/inst/filtfilt.m 2012-03-10 04:03:56.000000000 +0000
+++ octave-signal/inst/filtfilt.m 2012-03-10 04:07:10.000000000 +0000
@@ -117,11 +117,11 @@
%! y = filtfilt(b, a, r+s);
%! assert (size(r), size(y));
%! assert (mean(abs(y)) < 1e3);
-%! assert (corrcoef(s(250:750), y(250:750)) > .95)
+%! assert (corr(s(250:750), y(250:750)) > .95)
%! [b,a] = butter(2, [4e-4 8e-2]);
%! yb = filtfilt(b, a, r+s);
%! assert (mean(abs(yb)) < 1e3);
-%! assert (corrcoef(y, yb) > .99)
+%! assert (corr(y, yb) > .99)
%!test
%! randn('state',0);
Index: octave-signal/inst/private/h1_z_deriv.m
===================================================================
--- octave-signal.orig/inst/private/h1_z_deriv.m 2012-03-10 04:03:56.000000000 +0000
+++ octave-signal/inst/private/h1_z_deriv.m 2012-03-10 04:07:10.000000000 +0000
@@ -27,7 +27,7 @@
d = (-1)^n; % Vector with the derivatives of H1(z)
for i= (1:n-1)
d = [d 0]; % Shift result right (multiply by -z)
- d += prepad(polyderiv(d), i+1, 0, 2); % Add the derivative
+ d += prepad(polyder(d), i+1, 0, 2); % Add the derivative
endfor
%% Build output vector
Description: Adjust call to the impulse function
The call of the function impulse has changed in release 2.3.50 of the
control package. The tests in impinvar and invimpvar are changed
accordingly.
Author: Rafael Laboissiere <raf...@laboissiere.net>
Last-Update: 2012-03-10
Index: octave-signal/inst/impinvar.m
===================================================================
--- octave-signal.orig/inst/impinvar.m 2012-03-10 03:08:56.000000000 +0000
+++ octave-signal/inst/impinvar.m 2012-03-10 03:08:56.000000000 +0000
@@ -124,7 +124,7 @@
%!
%! % calculate impulse response of continuous time system
%! % at discrete time intervals 1/fs
-%! ys=impulse(s,1,(n-1)/fs,n);
+%! ys=impulse(s,(n-1)/fs,1/fs)';
%!
%! % impulse response of discrete time system
%! yz=filter(bz,az,[1 zeros(1,n-1)]);
Index: octave-signal/inst/invimpinvar.m
===================================================================
--- octave-signal-1.1.2.orig/inst/invimpinvar.m
+++ octave-signal-1.1.2/inst/invimpinvar.m
@@ -127,7 +127,7 @@ endfunction
%!
%! % calculate impulse response of continuous time system
%! % at discrete time intervals 1/fs
-%! ys=impulse(s,1,(n-1)/fs,n);
+%! ys=impulse(s,(n-1)/fs,1/fs)';
%!
%! % impulse response of discrete time system
%! yz=filter(bz,az,[1 zeros(1,n-1)]);
Description: Fix order od vector in the test of the residued function
I do not know why it should be so, but the elements of the expected
vectors in a test of the residued function was wrong.
Author: Rafael Laboissiere <raf...@laboissiere.net>
Last-Update: 2012-03-10
Index: octave-signal/inst/residued.m
===================================================================
--- octave-signal.orig/inst/residued.m 2012-03-10 03:22:53.000000000 +0000
+++ octave-signal/inst/residued.m 2012-03-10 03:23:51.000000000 +0000
@@ -157,5 +157,5 @@
%!test
%! B=[1 0 0 0 1]; A=[1 0 0 0 -1];
%! [r,p,f,m] = residued(B,A);
-%! assert({r,p,f,m},{[-1/2;1/2;-j/2;j/2],[-1;1;-j;j],1,[1;1;1;1]},100*eps);
+%! assert({r,p,f,m},{[-j/2;j/2;1/2;-1/2],[-j;j;1;-1],1,[1;1;1;1]},100*eps);
% Verified in maxima: ratsimp(%I/2/(1-%I * d) - %I/2/(1+%I * d)); etc.
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev