Unnecessary limitation in interp3

John W. Eaton jwe at octave.org
Fri May 22 13:02:21 CDT 2009


On 19-May-2009, Kris Thielemans wrote:

| 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.

I made this change.

Thanks,

jwe


More information about the Bug-octave mailing list