how to count daily events from a time series data
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
BATAKRUSHNA SENAPATI
le 4 Sep 2019
Réponse apportée : Akira Agata
le 20 Sep 2019
i have a time series data contains year, month, day, hours, and earthquke . how will i count number of earthquake daily
2 commentaires
Andrei Bobrov
le 4 Sep 2019
Modifié(e) : Andrei Bobrov
le 4 Sep 2019
Attach here small part your data as 'mat' file.
Reformat your data in timetable and use function retime.
Réponse acceptée
Akira Agata
le 20 Sep 2019
How about the following?
% Read your text data file
T = readtable('test.txt');
% Create datetime vector
Time = datetime(T.year,T.month,T.day,T.hrs,T.mins,T.sec);
% Calculate daily counts
TT = timetable(Time,ones(size(Time)),'VariableNames',{'Count'});
TT = retime(TT,'daily','sum');
0 commentaires
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Seismology dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!