V = [[NaN 2.05 NaN]', [1.96 1.76 1.88]', [NaN 1.74 NaN]']
V =
NaN 1.96 NaN
2.05 1.76 1.74
NaN 1.88 NaN
Vhat = inpaint_nans(V,2)
Vhat =
2.005 1.96 1.81
2.05 1.76 1.74
1.965 1.88 1.81
inpaint_nans is on the file exchange for download.