gap filling with liner interpolation

조회 수: 3 (최근 30일)
Binu
Binu 2019년 10월 15일
댓글: Binu 2019년 10월 16일
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
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 10월 15일
B Column?
Matt J
Matt J 2019년 10월 15일
Getting answers in the forum is generally more efficient if you attach attach relevant variables in a .mat file, rather than in .xlsx format.

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2019년 10월 15일
편집: Matt J 2019년 10월 15일
A=xlsread('data.xlsx');
I=A==-9999;
J=find(~I);
B=A;
B(I)=interp1(J,A(J),find(I));
  댓글 수: 1
Binu
Binu 2019년 10월 16일
Thanks Matt.It worked very well

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by