how to convert data from minute to hourly average
Ältere Kommentare anzeigen
this is the extension of my file which needs to be converted.this is the sample data.there are individual files for each day consisting of 1440 rows and 4 columns.this file is to be read in matlab and processed for 4 years. i need to average the time and data i.e, first two columns of the given table.there are some missing data in which the data is missing but the time is recorded.any program can solve my data.thanks in advance

4 Kommentare
Andrei Bobrov
am 16 Mär. 2018
Please attach two-three your files.
SD
am 16 Mär. 2018
KL
am 16 Mär. 2018
Use timetables.
SD
am 16 Mär. 2018
Akzeptierte Antwort
Weitere Antworten (1)
KSSV
am 16 Mär. 2018
YOu can load the text file using load or importdata. To egt hourly mean check the below example code.
t = 1:24*60 ; % time in minutes
A = rand(1,numel(t)); % some random data for 1440 minutes
% Arrange indices into hours
idx = reshape(1:24*60,60,[])' ;
% Arrange data into hours
A_hours = A(idx) ;
% GEt mean
A_hourly_mean = mean(A_hours,2) ;
Kategorien
Mehr zu Web Services finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!