One way of using gridfit just for interpolation is :
- Use gridfit in the whole grid zifit=gridfit(X,Y,Z,xi,yi)
- Use griddata in the same grid
zidata=griddata(X,Y,Z,xi,yi)
- Use isnan to know which elements are NaN in zidata, and apply it to zifit
At least for me it worked
- Use a isnan(griddata) to know which points are inside the original data, and apply it to the points created with gridfit