MATLAB: Gap filling with liner interpolation

gap-fillinginterpolationliner interpolation

Hi,
I have a data file (attached) which I need to fill gaps (here in -9999) by liner interpolation. Could anyone please help me with this.
Many thanks

Best Answer

A=xlsread('data.xlsx');
I=A==-9999;
J=find(~I);
B=A;
B(I)=interp1(J,A(J),find(I));
Related Question