Borrar filtros
Borrar filtros

Finding out the average values per day

23 visualizaciones (últimos 30 días)
Mark Rodger
Mark Rodger el 9 de Abr. de 2018
Respondida: Akira Agata el 16 de Abr. de 2018
I've got a 7536x2 table that shows hourly values per day over 10 months. I would like to find out the average value for each day of the year and plot it. Any thoughts?

Respuestas (1)

Akira Agata
Akira Agata el 16 de Abr. de 2018
Like this?
% Sample Data (Hourly values per day over 10 months)
Time = [datetime(2018,1,1):hours(1):datetime(2018,10,1)]';
Data = rand(size(Time));
YourData = table(Time,Data);
% Convert to timetable
TT = table2timetable(YourData);
% Calculate average value per day
DailyAvg = retime(TT,'daily','mean');

Categorías

Más información sobre Tables en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by