group excel data based on time and add a new matrix

need to group excel data based on time .example in column 5, 40189 . all 40189 data in matrix1 and then create second matrix to collect 40190 data . how can i make this?

Answers (1)

OK, I'll take a guess: data collected in 2010, tagged with Excel serial day numbers?
Read the spreadsheet in using readtable. Convert what has become Var5 to a datetime as
t.Var5 = datetime(t.Var5,'ConvertFrom','excel')
Add meaningful variable names to the table. If you have R2016b or later, convert to a timetable using table2timetable. Use varfun with time as the grouping variable, or use findgroups/splitapply, to compute whatever you need to on each subset of your data.
You likely do not need to split the data up.

Asked:

on 10 Mar 2018

Answered:

on 15 Mar 2018

Community Treasure Hunt

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

Start Hunting!