Unnecessary limitation in interp3

Kris Thielemans kris.thielemans at imperial.ac.uk
Tue May 19 15:01:28 CDT 2009


Hi

interp3 in Octave 3.0.3 (but apparently also in more recent versions) has a
check if the x,y,z dimensions are the same as those of the data. However,
this isn't necessary as you can interpolate to a different grid size.
Therefore, I recommend the following change:

L93:
      for i = 2 : 3
	% KT disable 2nd check
      % if (! size_equal (x{1}, x{i})) || ! size_equal (x{i}, v))
	if (! size_equal (x{1}, x{i}))
	  error ("dimensional mismatch");
	endif

interp3 calls interpn, which seems perfectly fine with different grid sizes.

Thanks!

Kris Thielemans
Senior Researcher 
Hammersmith Imanet Ltd
Cyclotron Building
Du Cane Road
London W12 0NN



More information about the Bug-octave mailing list