gap filling with liner interpolation

1 visualizzazione (ultimi 30 giorni)
Binu
Binu il 15 Ott 2019
Commentato: Binu il 16 Ott 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 Commenti
Matt J
Matt J il 15 Ott 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.

Accedi per commentare.

Risposta accettata

Matt J
Matt J il 15 Ott 2019
Modificato: Matt J il 15 Ott 2019
A=xlsread('data.xlsx');
I=A==-9999;
J=find(~I);
B=A;
B(I)=interp1(J,A(J),find(I));

Più risposte (0)

Categorie

Scopri di più su Interpolation in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by