filtering data from table
Show older comments
Hi I got a question,
I got a table (56688x3), it contains data from 2014 to 2020. I need to make a new table from the data of 2018.
% reading csv file to a table without header
KNMI = readtable('uurgeg_215_2011-2020.txt','ReadRowNames',true);
% Fill missing data
[KNMItable,missingIndices2] = fillmissing(KNMI,"constant",0);
% Rearranging Table with needed data
Time = datetime(KNMItable.YYYYMMDD,'ConvertFrom','yyyymmdd');
Temperatuur = KNMItable.T;
GlobalStraling = KNMItable.Q;
TQTable = table(Time, Temperatuur, GlobalStraling);
%% My attempt
TQTable2018 = Time(timerange('2018-01-01', '2018-12-31'), :); % spring time data
Accepted Answer
More Answers (0)
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!