Unnecessary limitation in interp3

John W. Eaton jwe at octave.org
Tue May 19 19:53:47 CDT 2009


On 19-May-2009, Kris Thielemans wrote:

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

Could you please post a simple example which demonstrates the failure?

Thanks,

jwe


More information about the Bug-octave mailing list