Code covered by the BSD License  

Highlights from
naninterp

from naninterp by E. Rodriguez
One dimensional Interpolation over NaNs.

naninterp(X)
function X = naninterp(X)
% Interpolate over NaNs
% See INTERP1 for more info
X(isnan(X)) = interp1(find(~isnan(X)), X(~isnan(X)), find(isnan(X)),'cubic');
return

Contact us at files@mathworks.com