MATLAB: How to divide a week of a timetable into hours timetableweek Hi, is it possible to devide a week of a timetable into 168 hours? I would need the means of a timetable from monday to sunday on an hourly basis so I can show how its behaving of the week Thx 🙂 Best Answer hourlytimetable = retime(yourtimetable, 'hourly', 'mean') Related SolutionsMATLAB: How to separate month, day of the week, and hour of the day for each row of a csv time series file so that I can do a factor analysis for month, day, hour Use a timetable!https://www.mathworks.com/help/matlab/timetables.htmlhttps://www.mathworks.com/help/matlab/matlab_prog/create-timetables.htmlImport your csv file as table and then create a timetable from it .Then you can do whatever you want to do with it, like monthly mean, yearly sum, etc. For example,data_table = readtable('yourfile.csv');data_timetable = table2timetable(data_table);and then you could use retimehttps://www.mathworks.com/help/matlab/ref/retime.html hourly_mean_table = retime(data_timetable,'hourly','mean') MATLAB: Calculating daily average curve from weekly data If i don't get wrong, it seems that you want to perform this operation:%% Mean along 10 columnsg1m = mean(g1,2);%% Reshape to get a the desired sizeg1m_w = reshape(g1m,[24 7]);%% Perform the mean againg1m = mean(g1m_w,2); Related QuestionDaily 3d array to monthly- dealing with alternate days in a month and leap years – How to do itWrite a script that will prompt the user for the month of interest.Hourly mean value from 10 second data
Best Answer