Fill missing NaN values with Interpolation
Mostra commenti meno recenti
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 Commenti
Adam
il 12 Lug 2018
doc spline
doc interp1
Tsehaye Gebreteklie
il 19 Apr 2022
knnimpute is prefere than spline. you can write the code like this.
clear all;
clc;
Temp = xlsread(A);
Filldata=knnimpute(Temp);
Risposta accettata
Più risposte (1)
ZaidiN
il 12 Lug 2018
0 voti
1 Commento
Pawan Sharma
il 12 Mag 2020
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.
Categorie
Scopri di più su Interpolation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!