Kai Habel - 2007-04-12

Using contourf.m with octave-2.1.73
-----------------------------------

Although contourf.m has been developed with octave 2.9.9
in mind, it is possible to use contourf with older version
of octave as well. This applies especially to the
cygwin version. Please follow the instructions given below:

1. contourf.m

Change line 147 from:
mark = false(size(lvl_idx));
to:
mark = logical(zeros(size(lvl_idx)));

2. get inpolygon from octave-forge

inpolygon has been added to octave-forge recently. It is
not (yet) included in debian etch. You can get it from the
geometry package there.

http://octave.cvs.sourceforge.net/octave/octave-forge/main/geometry/inst/inpolygon.m?rev=HEAD&content-type=text/plain

put inpolygon.m into octaves search path

3. add a function size_equal()

inpolygon.m uses the size_equal() function, which has been added to octave
recently (see src/data.cc).
One option is to add a file size_equal.m to octaves search path
containing:

function ret = size_equal(x,y)
  ret = all(size(x) == size(y))

Now you should be able to use contourf under octave-2.1.73 (cygwin)
Try:
contourf(peaks());