MATLAB: Interpolate include NaN data.

dataduplicate postinterp1interpolate

Data likes this
—–
3
NaN
NaN
7
NaN
NaN
2
NaN
NaN
19
NaN
NaN
12
—–
How interpolate NaN data?
I try interp1 fuction. But I failed.
Please help me.

Best Answer

Download inpaint_nans from the File Exchange. Although interp1 would also have been able to solve the problem too. inpaint_nans is far simpler to use for this though.