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

 Réponse acceptée

Walter Roberson
Walter Roberson le 10 Avr 2021

0 votes

Close.
TQTable = timetable(Time, Temperatuur, GlobalStraling);

Plus de réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by