The griddata function: griddata(x,y,z,xi,yi,method) won't work if xi and yi are vectors of the same size. Reproducible: Always Steps to Reproduce: Run the following script example: #!/usr/bin/octave -qf rand("state",1); # Nf number of fine grid points Nf=100; # Nc number of coarse grid points Nc=10; # Domain x0=-1; y0=-1; x1=1; y1=1; # 2*pi*f R=1; #3D fine grid graph x y z [100x1] vectors x=(x1-x0)*rand(Nf,1)+x0; y=(y1-y0)*rand(size(x))+y0; z=cos(R*(x.^2+y.^2)); # build an intersection line along which extrapolate Nc coarse values xi = linspace(x0,x1,Nc); yi = linspace(y0,y1,Nc); zi = griddata(x,y,z,xi,yi,"linear") Actual Results: ./prova_err.m error: product: nonconformant arguments (op1 is 7x1, op2 is 1x7) error: called from: error: /usr/share/octave/3.2.4/m/geometry/griddata.m at line 113, column 11 error: ./prova_err.m at line 25, column 4 Expected Results: ./prova_err.m zi = NaN 0.31105 0.80776 0.96378 0.99891 0.99656 0.96964 0.79186 NaN NaN ./prova_err.m zi = NaN 0.31105 0.80776 0.96378 0.99891 0.99656 0.96964 0.79186 NaN NaN
Created attachment 242751 [details] patch from http://octave.1599824.n4.nabble.com/griddata-fails-with-same-size-interpolation-vectors-td1673834.html
This works correctly in newer versions of octave.