filling missing value using linear interpolate in 2D
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
From the attached file, i used FUni=fillingmissing2(filename,''linear'') to fill the missing numbers from my data, is this the correct code but i am not quite sure about it, i just need confirmation before i go further
Risposte (1)
Star Strider
il 17 Ott 2023
This works —
T1 = readtable('GreenhouseData.xlsx', 'VariableNamingRule','preserve')
VN = T1.Properties.VariableNames;
T1(:,[2 3]) = fillmissing(T1(:,[2 3]),'constant','NaN');
T2 = fillmissing(varfun(@str2double,T1, 'InputVariables',[2 3]), 'linear');
T2 = addvars(T2, T1{:,1}, 'Before',1);
T2.Properties.VariableNames = VN
figure
plot(T2.Time, T2{:,[2 3]})
grid
xlabel(VN{1})
ylabel('Value')
legend(VN{[2 3]}, 'Location','NW')
It should be easier to use varfun for these conversions. It should not require creating a separate table.
.
0 Commenti
Vedere anche
Categorie
Scopri di più su Tables in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
