Mon 18 May 2015 11:24:40 PM UTC, comment #2:
Yes, zi2 is a 5x1 column vector (tested in Matlab).
I see from the public documentation that the 3-output form of griddata is deprecated, btw.
Also worth noting that there is no zero-output form anymore, calling griddata with no output arguments just returns the interpolated values same as the 1-output form.
So if anything, the fix should just be to get rid of the nargout == 0 case altogether.
|
Mon 18 May 2015 08:41:32 PM UTC, comment #1:
Could you try the following in Matlab?
What I find in Octave is that zi2 is a 1-D vector, not a 2-D matrix. When you try to call surf with
you get an error because zi2 needs to be a 2-D matrix (surface).
From the documentation, it seems that if xi and yi are vectors then the output should also be a vector of zi at the requested points. In that case, perhaps plot3() should be called instead of mesh() to plot individual points.
The code in griddata.m is
which could be modified to
|
Mon 18 May 2015 10:00:23 AM UTC, original submission:
If I try to use in Octave the griddata function as:
I obtain an error:
But in Matlab the function works and the output is a vector with the same dimensions as xi and yi
|