Borrar filtros
Borrar filtros

gap filling with liner interpolation

2 visualizaciones (últimos 30 días)
Binu
Binu el 15 de Oct. de 2019
Comentada: Binu el 16 de Oct. de 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 comentarios
KALYAN ACHARJYA
KALYAN ACHARJYA el 15 de Oct. de 2019
B Column?
Matt J
Matt J el 15 de Oct. de 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.

Iniciar sesión para comentar.

Respuesta aceptada

Matt J
Matt J el 15 de Oct. de 2019
Editada: Matt J el 15 de Oct. de 2019
A=xlsread('data.xlsx');
I=A==-9999;
J=find(~I);
B=A;
B(I)=interp1(J,A(J),find(I));

Más respuestas (0)

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by