gap filling with liner interpolation

1 Ansicht (letzte 30 Tage)
Binu
Binu am 15 Okt. 2019
Kommentiert: Binu am 16 Okt. 2019
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
  2 Kommentare
KALYAN ACHARJYA
KALYAN ACHARJYA am 15 Okt. 2019
B Column?
Matt J
Matt J am 15 Okt. 2019
Getting answers in the forum is generally more efficient if you attach attach relevant variables in a .mat file, rather than in .xlsx format.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Matt J
Matt J am 15 Okt. 2019
Bearbeitet: Matt J am 15 Okt. 2019
A=xlsread('data.xlsx');
I=A==-9999;
J=find(~I);
B=A;
B(I)=interp1(J,A(J),find(I));

Weitere Antworten (0)

Kategorien

Mehr zu Interpolation finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by