The patch attached below is currently being applied to the Debian package
octave-image (forthcoming version 1.0.15-1). It fixes the code in
stretchlim.m and fftconv2.m, in which the pre-3.6 behavior of ismatrix is
expected (returning false when the argument is a string).
I caught this during the automated checks of the Debian package. However,
the changes introduced by the patch are not yet enough. The checks fail
for all the assert calls in the code below:
#########################################################################
a = repmat(1:10, 5);
b = repmat(10:-1:3, 7);
assert(norm(fftconv2(b,a,'valid')-conv2(b,a,'valid')), 0, 1e6*eps)
x = 1:4; y = 4:-1:1; a = repmat(1:10, 5);
assert(norm(fftconv2(x,y,a)-conv2(x,y,a)), 0, 1e6*eps)
assert(norm(fftconv2(x,y,a,'full')-conv2(x,y,a,'full')), 0, 1e6*eps)
assert(norm(fftconv2(x,y,a,'same')-conv2(x,y,a,'same')), 0, 1e6*eps)
assert(norm(fftconv2(x,y,a,'valid')-conv2(x,y,a,'valid')), 0, 1e6*eps)
#########################################################################
Best,
Rafael
Description: Take into account the new behavior of ismatrix
In Octave 3.6, the behavior of ismatrix() has changed. This functions
returns now true for strings. The code in stretchlim.m and fftconv2.m
relied in the older behavior (returning false).
Author: Rafael Laboissiere <raf...@laboissiere.net>
Last-Update: 2012-03-11
Index: octave-image/inst/stretchlim.m
===================================================================
--- octave-image.orig/inst/stretchlim.m 2012-03-10 16:47:06.000000000 +0000
+++ octave-image/inst/stretchlim.m 2012-03-10 16:49:40.000000000 +0000
@@ -73,7 +73,7 @@
usage("LOW_HIGH=stretchlim(I [, TOL]), LOW_HIGH=stretchlim(RGB [, TOL])");
endif
- if(!ismatrix(image))
+ if(!ismatrix(image) || ischar(image))
error("stretchlim: image should be a matrix");
endif
Index: octave-image/inst/fftconv2.m
===================================================================
--- octave-image-1.0.15.orig/inst/fftconv2.m
+++ octave-image-1.0.15/inst/fftconv2.m
@@ -44,7 +44,7 @@ function X = fftconv2(varargin)
shape = "full";
rowcolumn = 0;
- if ((nargin > 2) && ismatrix(varargin{3}))
+ if ((nargin > 2) && ismatrix(varargin{3}) && !ischar(varargin{3}))
## usage: fftconv2(v1, v2, a[, shape])
rowcolumn = 1;
------------------------------------------------------------------------------
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