Fill missing NaN values with Interpolation
이전 댓글 표시
I have Matlab 2013, and I want to apply spline interpolation in my data matrix with NaN values. Is there any other method which can do this. As fillmissing functon is not available in lower versions.
댓글 수: 2
Adam
2018년 7월 12일
doc spline
doc interp1
Tsehaye Gebreteklie
2022년 4월 19일
knnimpute is prefere than spline. you can write the code like this.
clear all;
clc;
Temp = xlsread(A);
Filldata=knnimpute(Temp);
채택된 답변
추가 답변 (1개)
ZaidiN
2018년 7월 12일
0 개 추천
댓글 수: 1
Pawan Sharma
2020년 5월 12일
This is liner interpolation. To make it spline interpolation, add spine as a method of interpolation
a(isnan(a)) = interp1(x(~isnan(a)),a(~isnan(a)),x(isnan(a)), 'spline') ;
It do replace NaNs with interpolated values.
카테고리
도움말 센터 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!