gap filling with liner interpolation

1 vue (au cours des 30 derniers jours)
Binu
Binu le 15 Oct 2019
Commenté : Binu le 16 Oct 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 commentaires
KALYAN ACHARJYA
KALYAN ACHARJYA le 15 Oct 2019
B Column?
Matt J
Matt J le 15 Oct 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.

Connectez-vous pour commenter.

Réponse acceptée

Matt J
Matt J le 15 Oct 2019
Modifié(e) : Matt J le 15 Oct 2019
A=xlsread('data.xlsx');
I=A==-9999;
J=find(~I);
B=A;
B(I)=interp1(J,A(J),find(I));
  1 commentaire
Binu
Binu le 16 Oct 2019
Thanks Matt.It worked very well

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Interpolation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by