filtering data from table

13 次查看(过去 30 天)
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

采纳的回答

Walter Roberson
Walter Roberson 2021-4-10
Close.
TQTable = timetable(Time, Temperatuur, GlobalStraling);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Tables 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by