Francesco Potorti` wrote: > package octave3.0 > tags 492223 upstream > stop > > Dear Octave maintainers, > > The bug report reproduced below has been filed against the Debian > package and regards the upstream sources. The report is recorded at > http://bugs.debian.org/492223 > > Thanks, > > > Package: octave3.0 > Version: 1:3.0.1-4 > Severity: normal > File: /usr/share/octave/3.0.1/m/plot/contourf.m > > Contourf works with X and Y generated by meshgrid. > It also works with vector X and Y of the same size. > It fails if vector X and Y are of different size. > > octave> x=1:5;y=x;z=vander(x);contourf(x,y,z,4) > octave> x=1:5;y=x(1:end-1);z=vander(x)(1:end-1,:); > octave> contourf(x,y,z,4) > error: patch: X and Y must be of same size > error: evaluating if command near line 230, column 3 > error: called from `contourf:parse_args' in file > `/usr/share/octave/3.0.1/m/plot/contourf.m' > error: called from `contourf' in file > `/usr/share/octave/3.0.1/m/plot/contourf.m' > octave> [xx,yy]=meshgrid(x,y);contourf(xx,yy,z,4) >
Ok, changeset attached D.
# HG changeset patch # User David Bateman <[EMAIL PROTECTED]> # Date 1217118576 -7200 # Node ID 595b089bb33a6684e2c45300b3394041fc48c6cf # Parent 7b5870224c9dfadef931c4ee1b8b40324893b3da Allow X/Y to be unequal vectors in contourf diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,7 @@ 2008-07-27 David Bateman <[EMAIL PROTECTED] 2008-07-27 David Bateman <[EMAIL PROTECTED]> + * plot/contourf.m: Allow X,Y to be unequal vectors. + * control, finance, quaternion: Remove directories and all of the files they contain. * Makefile.in: Remove all references to the above directories. diff --git a/scripts/plot/contourf.m b/scripts/plot/contourf.m --- a/scripts/plot/contourf.m +++ b/scripts/plot/contourf.m @@ -227,7 +227,7 @@ function [X, Y, Z, lvl, patch_props] = p arg(1:4) = []; endif - if (any (size (X) != size (Y))) + if (!isvector (X) || !isvector (Y) && any (size (X) != size (Y))) error ("patch: X and Y must be of same size") endif