group excel data based on time and add a new matrix
Mostrar comentarios más antiguos

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?
1 comentario
gkn dmr
el 11 de Mzo. de 2018
Respuestas (1)
Peter Perkins
el 15 de Mzo. de 2018
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.
Categorías
Más información sobre Spreadsheets en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!