Citing files on the FEX has come up often, enough so that we had a discussion about it, and came up with several schemes that seem viable. Find them at this link:
All you need do is modify the citation style you prefer to fit inpaint_nans, instead of gridfit.
09 Aug 2014
Interpolates (& extrapolates) NaN elements in a 2d array.
Dragon Yang: the error message is telling you that MATLAB cannot find this function on its path. Try downloading the M-file from this website and saving it to your working directory. Any search engine will provide step-by-step instructions too.