When working with “meshgrid” or “griddata”, it is required that it is a full grid. Any voids would have to be replaced by a NaN.
You could use “scatteredInterpolant” class for your question and replace the voids with a value, example, NaN. The interpolation method depends on the problem you are trying to solve and you can set properties of the class object to achieve this.
Documentation for scatteredInterpolant: http://www.mathworks.com/help/matlab/ref/scatteredinterpolant-class.html
You can look at the Replacement of Sample Values in the examples section of the documentation for help on replacing values.