How to decide interpolation technique?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Anak Agung Adhi Dermawan
le 31 Juil 2022
Commenté : Walter Roberson
le 4 Août 2022
Hello, I plot the first column and fourth column of this txt file time series data and there are some empty data . how can I know what percentage of the empty data and interpolate the data?
0 commentaires
Réponse acceptée
Walter Roberson
le 31 Juil 2022
You might want to choose a different aggregation method such as 'minutely'
format long g
filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/1083480/cbrn2020.txt';
data = readtable(filename);
data{1:5,1}
tt = table2timetable(data, 'RowTimes', datetime(0,0,0) + years(data{:,1}));
ttt = retime(tt(:,4), 'daily', 'sum');
ttt(1:5,:)
plot(ttt, 'Var4')
7 commentaires
Walter Roberson
le 4 Août 2022
You can always extract data, such as
ttt.Var4
You can do things like,
aggregations = {'hourly', 'daily', 'monthly'};
for K = 1 : length(aggrevations)
ttt = retime(tt(:,4), aggrevations{K}, 'sum');
plot(ttt.Properties.RowTimes, ttt.Var4, 'DisplayName', aggrevations{K});
hold on
end
hold off
legend show
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Interpolation of 2-D Selections in 3-D Grids dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!